Autoinclude some data into contact form.
Permalink
Is it possible to automatically put some data into form depending on refferal site, or link?
The case is - my client is travel agency, we make one page for each trip. Each trip has also some different dates, so we make on that page list of all dates to that destination, and by each date is "book a trip" button, but all that buttons lead to one contact form. Is it possible to fill in some fields automatically, depanding on which "book a trip" button users will click? It would be the best to fill in also destination and date, but anything would be super...
Any ideas?
The case is - my client is travel agency, we make one page for each trip. Each trip has also some different dates, so we make on that page list of all dates to that destination, and by each date is "book a trip" button, but all that buttons lead to one contact form. Is it possible to fill in some fields automatically, depanding on which "book a trip" button users will click? It would be the best to fill in also destination and date, but anything would be super...
Any ideas?
Anyone?
There are multiply ways you can do this:
1: _GET
2: $_SERVER['HTTP_REFERER']
Check outhttp://php.net/manual/en/reserved.variables.server.php... , and use a similar switch-case statement for that.
1: _GET
<a href='http://mysite.com/?came_from=Derp'>Go to site from derp</a>
2: $_SERVER['HTTP_REFERER']
Check outhttp://php.net/manual/en/reserved.variables.server.php... , and use a similar switch-case statement for that.
Thanks for answering, this is what I was looking for. Now there is only question if it can be used with standard form block.
Before I'll start experimenting how to use it in best way - maybe someone want to give me some clues?
Before I'll start experimenting how to use it in best way - maybe someone want to give me some clues?