by
KK » Wed Aug 15, 2012 4:52 am
Hi,
As explained at
http://www.couchcms.com/docs/concepts/forms.html,
submitted values of all the fields in the form are available in the success case as variables of the same names prepended by 'frm_'. So, for example, if the form had two fields 'name' and 'email' Couch will make available the values submitted through them as variables named 'frm_name' and 'frm_email'.
It should be easy now to see how to use the submitted values in the 'subject' of the email. Following is a portion of a form doing so (
don't forget to use double-quotes with the parameter where the variables are being show).
- Code: Select all
<cms:if k_success >
<h3>Thanks for your submission. We'll get back to you.</h3>
<cms:send_mail from='abc@somemail.com' to='xyz@somemail.com' subject="Feedback from <cms:show frm_name /> (<cms:show frm_email />)">
The following is an email sent by a visitor to your site:
<cms:show k_success />
</cms:send_mail>
</cms:if>
Hope this helps.