Forum
Adding a form and passing string to hidden field on events page
Hi,
I have an events detail page that uses the event app. I've customised the html templates to suit my needs but one thing I want to do is include a form template and then pass in the event title as a hidden field of the form. I'm trying to make a sign up form for the event so want to pass it in the submission.
I'm a bit confused on the best way to add the form and the variable as the event.php has an event-detail.html template and I want to pass another template to that page.
Thanks
Hi Andrew, I do a similar thing with a job application form where a hidden field shows the Job ID Number.
I think you can do it by adding the form to your event.html template, like this:
Simon... Nested tags? I had no idea this worked. :)
I am guessing since the form is processed after the event that's how this works. Cause I know you can't nest content tags. But I have never done this before. Thanks.
Hi Robert, yes, I have it working on one of my sites, though with 'Content' rather than Events:
I guess because the content is declared and saved earlier in the template. when the form is submitted, the label and value show in the email notification and the listing in Forms.
Hi Simon,
Thanks your solution worked.
That's great :)
Sorry to revive an old thread but would one be able to do this with still using two seperate content regions? I have a form that comes out at the bottom of a page where I need to pass in the value of a content id from higher up the page. I'm stumped!