• Resolved apexdigitalro

    (@apexdigitalro)


    An additional question, if I may:

    Let’s say I have multiple services, on different pages. If I create a single form, can I differentiate between the pages on which this form was submitted?

    Let’s say I have form nr. 1.

    Form 1 is on Page A and Page B.

    If a user submits form 1 from Page B, how can I know it’s from Page B and not Page A?

    Should I simply create Form 1 for Page A, Form 2 for Page 2 and so on?

    If it makes any difference, Page A and Page B are CPTs.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can use the build-in template variables to pull in post data, for example into the value of a hidden field.

    https://www.htmlformsplugin.com/kb/template-variables/

    Hope that helps. If you have any questions, please let me know!

    Thread Starter apexdigitalro

    (@apexdigitalro)

    Awesome! Thank you so much for the awesome support.

    I am now creating a hidden field – what kind of input should this be, however? Would “hidden” work? Something like:

    <input type=”hidden” name =”hiddenfield” value =”{{url_params.utm_source}}” />

    ?

    Hey @apexdigitalro,

    If you do not want to show the field to the send user, the the field type should be “hidden”.

    Thread Starter apexdigitalro

    (@apexdigitalro)

    Thank you. I’ve already tested it, but I cannot seem to figure out one thing:

    If the field is set to “hidden”, the data won’t be passed through email for some reason.

    The second thing I’m unsure about is how to get post.title, since it doesn’t seem to be working.

    Thank you!

    Thread Starter apexdigitalro

    (@apexdigitalro)

    Never mind, the value is passed even if the field is set to hidden.

    However, I cannot figure out how to output the Post Title. ID seems to be working fine. URL param also does not seem to output any values, and I failed to find other params that I could pass.

    I really appreciate your help!

    Thread Starter apexdigitalro

    (@apexdigitalro)

    Again, found it!

    For anyone else looking, the variable is {{post.post_title}}

    Thanks for sharing!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to differentiate between pages?’ is closed to new replies.