Passing Parameters into a Form
PermalinkI'm a beginner and having trouble finding concise information that tells me what I need to know, without overwhelming me with a vast amount of information I don't need to know at this time.
I see I can purchase a big forms handling package that does lots of stuff I don't really need.
A basic form block does most everything I need.
If I have the basic form and select the "Redirect to another page after submission" option, how do I create a vanilla .php file in the right place. This vanilla .php should validate the data, and then redirect to another form passing in some data.
Using "standard widgets" might be the way to go. http://www.concrete5.org/documentation/developers/forms/standard-wi...
But I don't see where to put the php fragments from the "standard widgets" docs.
It would be good if I could find a nice simple example to tweak.
There are some tutorials and how-to's on single pages:
http://www.concrete5.org/documentation/how-tos/developers/basic-mvc...
http://www.concrete5.org/documentation/how-tos/developers/shopping_...
http://www.concrete5.org/documentation/how-tos/developers/build-a-s...
Hope this helps!
The bit I am after is as follows.
I've created a form using the Form block. The form works fine, it is a contact form e.g.http://www.domain.com/contact-us
From some pages on my web site (e.g. product) I have a button "Enquire". If you click on the button I'm redirecting towww.www.domain.com/contact-us?product=ABC...
From the contact-us page which contains the form, I need to be able to grab hold of the 'product' parameter and embed it in the form as a hidden form field.
I can't see an obvious (easy) way to do this ? I am not sure single pages would help or are you saying I need to not use the Form block and instead make my own form page from scratch as a Single Page?
Thanks for your assistance
I was thinking it might be worth buying the PAKT to get my feet on the groud. But from the Table of Contents on the PAKT website forms do not appear to be discussed in this book.
Once again is there a nice example of passing in parameters to a vanilla concrete5 form block.