Developer forum

Forum » Development » Changing the Subject in the Forms module

Changing the Subject in the Forms module


Reply

We have had a request from a customer that wants to use one of the fields in the form in the subject field of the email that is sent.


An example could be that we have a form like this:


 


Name: ____


City: ______


 


Now the subject of the email should be:


 


"_NAME_ from _CITY_ sent a contact request"


 


Can I hook in to this somehow in a custom module? Or can I maybe use some sort of template tags in the Paragraqph Module settings?


Replies

 
Nicolai Høeg Pedersen
Reply
mortenbock wrote:


We have had a request from a customer that wants to use one of the fields in the form in the subject field of the email that is sent.




An example could be that we have a form like this:




 




Name: ____




City: ______




 




Now the subject of the email should be:




 




"_NAME_ from _CITY_ sent a contact request"




 




Can I hook in to this somehow in a custom module? Or can I maybe use some sort of template tags in the Paragraqph Module settings?





 


Hi Morten


 


You can use the same method as described in this thread: http://developer.dynamicweb.dk/Forum-17061.aspx?action=ShowThread&ThreadID=516


 


The form has a hidden field called Subject which holds the subject inserted in the administration. Then you can attach an onchange event to the Name and City fields which will update the hidden subject field.


 


 

 
Reply

Ahh, very nice. Thank you.

 

You must be logged in to post in the forum