[#5358] Adding uploaded file registration field into email

8 years 10 months ago - 8 years 10 months ago #266348 by cagoffice
I know how to add registration fields into those automated emails so our moderator can see user name, email etc. but how do I get a link in there that links to the uploaded file registration field where the user has uploaded a .pdf?

I want the moderator to be able to link to the file right from their email.

Please Log in to join the conversation.

8 years 10 months ago #266386 by krileon
You should be able to substitute in the file field URL using [FIELD_NAME] substitution. If that's not working try the following usages.

[cb:userdata field="FIELD_NAME" /]

or

[cb:userfield field="FIELD_NAME" output="csv" /]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 10 months ago - 8 years 10 months ago #266388 by cagoffice
I am probably doing it wrong (see screenshot for my file upload field names).

Would I just put [cb_fileupload_1]? Because that doesn't work.

Or do I have to put [cb:userdata field="cb_fileupload_1" /]?
Attachments:

Please Log in to join the conversation.

8 years 10 months ago #266399 by krileon
You need to put the field name. So yes cb_fileupload_1 is correct. Try all 3 variants above, but [FIELD_NAME] should work fine to give you the URL to the file.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

8 years 10 months ago #266497 by cagoffice
I tried [cb:userdata field="cb_fileupload_1" /] and my whole site crashed.

ERROR LOG
[25-Jun-2015 10:03:29 America/Chicago] PHP Parse error: syntax error, unexpected T_STRING, expecting ')' in /mnt/stor1-wc1-dfw1/380505/380510/www.cag-acg.org/web/content/SANDBOX-341/components/com_comprofiler/plugin/language/en-gb/cbplugin/cblanguageoverride-language.php on line 20

Is it because I copy and pasted? Or are the quotations the problem?

Please Log in to join the conversation.

8 years 10 months ago #266498 by krileon
You've an unescaped quote in your string so you've a syntax error in your PHP. You really need to be using an IDE or you won't be able to see syntax errors when adding PHP. phpstorm, netbeans, and probably notepad++ with PHP plugin can help with this (there's quite a few more PHP ides out there with many being free).

My guess is your language string is using " to enclose it. This means you need to escape the " in your substitutions with a backslash. So you'd have the following in your language string.

[cb:userdata field=\"cb_fileupload_1\" /]

Alternatively just encase your language string with single quotes ' instead of double quotes " then escape any single quotes you may have.

Not much more I can advise without the full PHP source of your language string.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.208 seconds

Facebook Twitter LinkedIn