I'd like the a copy of the form sent to the submitter if the checkbox value is true.
I've created a custom workflow, using the "send xslt transformed email, extended" option.
I've filled the "Email (Enter the receiver email)" option with the "{emailaddress}" and included my XSLT.
The form has a checkbox which by default is checked, this checkbox (Send me a copy) allows the submitter the option of having a copy of the form sent to them.
So far I've tried the following option, but the form values are still being sent to the submitter.
I want the submitter to only receive an email copy of the form if the checkbox is checked.
At a first glance it seems like it's because your IF condition says if the senmeacopy//value is NOT 1...since you're using !1...What happens if you remove the "!" from the expression? Does it then work?
If I remove the exclamation mark "!" nothing appears in the email, and the email still sends to the submitter.
I don't want any email to be sent if they've unchecked the "send me a copy" checkbox.
As an alternative I could use a "choose" which would allow me to change the text the submitter receives, so for those who uncheck the checkbox they can just receive an email letting them know the form has been submitted.
But I would prefer no email to be sent if they have unchecked the checkbox.
Cheers, JV
Example of my "choose" option:
<xsl:template match="/">
<xsl:variable name="emailStr">
<xsl:choose>
<xsl:when test="$records//fields/child::* [name() = 'sendmeacopy']/.//value = 'True'">
<h3>Intro</h3>
<p>
Hello, this is a sample email using xslt to convert a record into a custom email
</p>
<h3>the fields</h3>
<ul>
<xsl:for-each select="$records//fields/child::*">
<li>
<h4>
Caption: <xsl:value-of select="./caption"/>
</h4>
<p>
<xsl:value-of select=".//value"/>
</p>
</li>
</xsl:for-each>
</ul>
<p style="color:red;">This is for the ages: <xsl:value-of select="$records//fields/sendmeacopy//value"/></p>
<h3>The actual xml</h3>
<xsl:copy-of select="$records"/>
</xsl:when>
<xsl:otherwise>
<p>Hi <xsl:value-of select="$records//fields/firstname//value"/>, your form submission has been successful.</p>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of disable-output-escaping="no" select="$emailStr" />
Send copy of form if checkbox value is true
I'd like the a copy of the form sent to the submitter if the checkbox value is true.
I've created a custom workflow, using the "send xslt transformed email, extended" option. I've filled the "Email (Enter the receiver email)" option with the "{emailaddress}" and included my XSLT.
The form has a checkbox which by default is checked, this checkbox (Send me a copy) allows the submitter the option of having a copy of the form sent to them.
So far I've tried the following option, but the form values are still being sent to the submitter.
I want the submitter to only receive an email copy of the form if the checkbox is checked.
Any help will be greatly appreciated. Cheers, JV
Hi JV
At a first glance it seems like it's because your IF condition says if the senmeacopy//value is NOT 1...since you're using !1...What happens if you remove the "!" from the expression? Does it then work?
/Jan
Hi Jan,
If I remove the exclamation mark "!" nothing appears in the email, and the email still sends to the submitter.
I don't want any email to be sent if they've unchecked the "send me a copy" checkbox.
As an alternative I could use a "choose" which would allow me to change the text the submitter receives, so for those who uncheck the checkbox they can just receive an email letting them know the form has been submitted.
But I would prefer no email to be sent if they have unchecked the checkbox.
Cheers, JV
Example of my "choose" option:
is working on a reply...