10378 Posts in 2194 Topics by 1710 members
| Go to End | Next > | |
| Author | Topic: | 735 Views |
-
Userforms - Removing HTML Fields From Email

26 November 2011 at 10:56am
I've created a form that has multiple html fields. When the form is submitted, the email is filled with values like EditableLiteralField# everywhere I used an html field.
Is there a way to remove them from being included in the email that is sent out?
Possible by just editing the .ss template and doing an if check for the field type and not writing it if true?
-
Re: Userforms - Removing HTML Fields From Email

28 November 2011 at 10:41pm
Add a function showInReports() { return false; } to your EditableLiteralField.
Can't imagine why it'll need to be included anyway. Perhaps it should be an option in the CMS to include it in the email (off by default).
-
Re: Userforms - Removing HTML Fields From Email

30 November 2011 at 6:07am
Thanks. That did it. And yes, I'd prefer it if future versions had this by default as I don't see the point in including it in emails.
I'd also like it if you could set the col width for textareas in the admin panel as well. I only see an option to do rows, unless I'm missing something. Just styled it via css for now, but not as flexible if I want my client to do it.
One last thing. In the emails being sent, single quotes are being replaced by the html entities. So the title of the field in the email looks like this for example. Patient's First Name instead of Patient's First Name
I'm using html emails.
-
Re: Userforms - Removing HTML Fields From Email

30 November 2011 at 9:44am
You're using the latest master?
Raise all those as tickets (either bugs or enhancements) on open.silverstripe.org so we don't forget them. Assign them to userforms and wrossiter (me) and I'll ensure they're fixed for the next release.
Currently the plan from me is to get a UserForms 0.4 out as udf master has a year of bug fixes since the last 'release'. 1.0 will be released after SS3.0 beta.
-
Re: Userforms - Removing HTML Fields From Email

30 November 2011 at 9:51am
Ya I'm using master from github so I'll add those to the bug tracker at some point today.
Thanks for the help.
-
Re: Userforms - Removing HTML Fields From Email

1 December 2011 at 8:39am
Hi Will,
Is there an easy way to set it so if a field isn't filled out in the form, then it isn't included in the email template? Not all my fields are required, so some can be blank, but the title of the field is included in the email body which isn't necessary.
-
Re: Userforms - Removing HTML Fields From Email

1 December 2011 at 10:27am
You could try a custom template for the email that just has a <% if FormattedValue %> wrapper around the dt/dd.
-
Re: Userforms - Removing HTML Fields From Email

1 December 2011 at 2:16pm
Is there a way to set custom templates with this module per form or are you saying to just edit the file you linked me?
I knew it was possible to set custom templates when you did the forms by hand. I didn't think it was possible with this module.
| 735 Views | ||
| Go to Top | Next > |


