• I’m using WP Contact Form 7 as a training event registration form. Clients hit the event list page, pick their event and click ‘register here’ which takes them the to registration page where I’m calling the form.

    At the moment, they have to manually select their event at this point but I’d like to automatically pass the page slug as a variable into the form when they click through.

    Is this possible? How would I call the variable in the messages that are generated by the form?

    John

    https://www.ads-software.com/extend/plugins/contact-form-7/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Put [_post_name], [_post_title] or [_post_url] inside mail message body.

    https://contactform7.com/blog/2009/12/25/special-mail-tags/

    Thread Starter John Peden

    (@jcpeden)

    Thanks for the reply, that is certainly a start! Would it be possible to do something like this:

    Event page -> Training registration page

    With the slug of the event page being passed into the training registration page?

    Thread Starter John Peden

    (@jcpeden)

    Thinking about it Takayuki,

    I could create a generic form and call if on each event page. Then using the markup you suggested, I can load in the event (as it will by the post name).

    Brilliant!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How To pass variable (like page slug) into WordPress Contact Form 7?’ is closed to new replies.