We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6408
    • 58 Posts
    Hi there,

    Im trying to build a ’quickcontact’ form that appears on all template pages. In order to track where the visitor came from when they fill out the form, I’d like to parse the pagetitle tag through a form using the FormIt plugin.

    I have managed to parse the pagetitle in the subject field using the following snippet call:

    [[!FormIt? &hooks=`spam,email,redirect` &emailTpl=`QuickFormReport` &emailTo=`[[++emailsender]]` &emailUseFieldForSubject=`0` &redirectTo=`15` &submitVar=`submitContact` &emailSubject=`[[*pagetitle]]`]] 


    ...and this works fine.

    But if I wanted to parse the pagetitle tag using a hidden input field in my form, how would I go about this?

    Many thanks for any help


    Dan



    *Edited to correct an error where [[*title]] was used instead of [[*pagetitle]]


      • 6408
      • 58 Posts
      Ok this seems to be much much simpler than I imagined. If this is incorrect, please let me know if I have made an obvious mistake...

      I added:


      <input type="hidden" name="page" id="page" value="[[*pagetitle]]"/>


      to my form, and then addded:
      <p><strong>Subject:</strong>[[+page]]</p>


      this seems to work, but I thought that form fields had to have the formit hook on them?



      Dan