Help to capture and show a field response using smarty
Help to capture and show a field response using smarty
Hi
I hope this is the right place to ask for this. In Form Builder, how can I capture someone`s selection (radio buttons) and have this show in the email subject line in my inbox? I have very little knowledge about smarty-tags, so I would very much appreciate it if someone could point me in the right direction.
Please ask if you need more information.
Ps! I am using Form Builder version 0.7.4 and Cmsms version 1.11.11
Tom
I hope this is the right place to ask for this. In Form Builder, how can I capture someone`s selection (radio buttons) and have this show in the email subject line in my inbox? I have very little knowledge about smarty-tags, so I would very much appreciate it if someone could point me in the right direction.
Please ask if you need more information.
Ps! I am using Form Builder version 0.7.4 and Cmsms version 1.11.11
Tom
Re: Help to capture and show a field response using smarty
Before anything else: please downgrade to FormBuilder 0.7.3. Version 0.7.4 wasn't stable and was removed from the Forge. If you have already too much work invested in custom forms, export them to XML, uninstall FB, remove the folder and install 0.7.3 from scratch. Then import the xml files.
As for your question, please read the help page of FormBuilder, and consult the list of available fields in the Advanced Settings of Email Results to set Address(es) disposition. These Smarty variables are available (iirc) in the Email Subject Line field of the Email Results to set Address(es) disposition, you just have to copy the one you want and paste it back in the Email Subject Line field.
HTH
As for your question, please read the help page of FormBuilder, and consult the list of available fields in the Advanced Settings of Email Results to set Address(es) disposition. These Smarty variables are available (iirc) in the Email Subject Line field of the Email Results to set Address(es) disposition, you just have to copy the one you want and paste it back in the Email Subject Line field.
HTH
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Help to capture and show a field response using smarty
Thank you. I did what you said about downgrading the Form builder version. Everything seemed to go well, but when testing the form I now get this error:
Warning: Illegal offset string 'sent' in
/xxxx/xxx/xxxx/xxxx/FormBuilder/classes/DispositionEmailBase.class.php on line 82
This goes for both my forms. Email is sent but the input from fields are displayed in the wrong places. I get phone number where the adress should be and so on...
Suggestions?
Warning: Illegal offset string 'sent' in
/xxxx/xxx/xxxx/xxxx/FormBuilder/classes/DispositionEmailBase.class.php on line 82
This goes for both my forms. Email is sent but the input from fields are displayed in the wrong places. I get phone number where the adress should be and so on...
Suggestions?
Re: Help to capture and show a field response using smarty
mmm, other than that warning, does it work?Trenia wrote:Warning: Illegal offset string 'sent' in
/xxxx/xxx/xxxx/xxxx/FormBuilder/classes/DispositionEmailBase.class.php on line 82
If it doesn't fail (it shouldn't), I wouldn't be too concerned with that (mind you that on a production site, the errors should be logged not displayed): this is fixed in svn already and just waiting for next release (in final tests stage).
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Help to capture and show a field response using smarty
Thank you. Yes the result is shown and the email is sent. but the error is visible on top of the page.Jo Morg wrote:mmm, other than that warning, does it work?
If it doesn't fail (it shouldn't), I wouldn't be too concerned with that (mind you that on a production site, the errors should be logged not displayed): this is fixed in svn already and just waiting for next release (in final tests stage).
What about the the other errors? Field results showing up in wrong places? Is this also because of the same thing?
Re: Help to capture and show a field response using smarty
The errors are displayed regardless of your page templates layout, so errors usually deface the pages where they appear in.Trenia wrote:Thank you. Yes the result is shown and the email is sent. but the error is visible on top of the page.
What about the the other errors? Field results showing up in wrong places? Is this also because of the same thing?
http://php.net/manual/en/function.error-reporting.php
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Help to capture and show a field response using smarty
Well, in the last 3-4 years I`v never had this error appearing, no matter what version I have used, isn`t that a little strange? Sure it hasn`t something to do with reinstalling? By the way, I noticed that the {$fld_xx} numbers are changed now, after downgrading. I guess that is why the field responses came out wrong. Seems to be okey now, but still the string error though.
Anyway, thank you very much for helping.
Anyway, thank you very much for helping.
Re: Help to capture and show a field response using smarty
To be able to answer that I'd need a lot more info that what I have available atm.Trenia wrote:Well, in the last 3-4 years I`v never had this error appearing, no matter what version I have used, isn`t that a little strange?
Yep, developers usually do (and should) keep the error level set to show all errors on developing environments. That is the best way to avoid errors, bugs, etc.Trenia wrote:Seems to be okey now, but still the string error though.
However there are some circumstances that may trigger the display errors on scripts that used to run without errors before, one of these being differences in how PHP is implemented between versions, even differences in what is considered an error (or a warning, or even a notice for that matter)... these are not controlled by the script developer.
That's why it is recommended to suppress the display of PHP errors (all of them) in production servers, logging them to a file. There a few ways to do this, just google for php error levels, or check the link on my previous post.
No problem.Trenia wrote:Anyway, thank you very much for helping.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Help to capture and show a field response using smarty
I managed to get rid of the error displaying when hitting submit in the forms.
I tried several solutions. Adding code to .htaccess did not work. Adding code to php.ini did not work, but finally after adding this to my index.php it finally worked. Don`t know if it is optimal though..
I tried several solutions. Adding code to .htaccess did not work. Adding code to php.ini did not work, but finally after adding this to my index.php it finally worked. Don`t know if it is optimal though..
Code: Select all
<?php
ini_set('display_errors','off');
?>Re: Help to capture and show a field response using smarty
It's fine, at least until next version of FormBuilder is released.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Help to capture and show a field response using smarty
I'd recommend using config.php for that. config.php would not be overwritten during future upgrades of CMSMS.Trenia wrote:... but finally after adding this to my index.php it finally worked. Don`t know if it is optimal though..
Code: Select all
<?php ini_set('display_errors','off'); ?>
Re: Help to capture and show a field response using smarty
@velden good call! 
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Help to capture and show a field response using smarty
Thank you velden. Done!velden wrote:I'd recommend using config.php for that. config.php would not be overwritten during future upgrades of CMSMS.


