How can I send Contact Form 7 data as search input to another website?

552 views Asked by At

I'm trying to use the Contact Form 7 plugin for Wordpress for a local hotel that is owned by a large national chain (Choice Hotels).

Choice Hotels redirects all bookings to their website but we want to build a form that lives on this individual website and then performs a search for the given arrive date, depart date, # of rooms, # of adults, and # of children.

This "Easy Booker" is an example of the functionality that we want (not the design though, that's handled by Contact Form 7 in the theme we're using) http://www.comfortinnalbany.com/

Do I need to use a PHP script? Can I do anything inside Contact Form 7 itself?

1

There are 1 answers

0
Web Guy On

You could do just what Easy Booker does: include the parameters in the URL.

https://www.choicehotels.com/new-york/castleton/comfort-inn-hotels/ny279?Submit=RESERVE%20%20&checkInDate=2015-01-01&checkOutDate=2015-01-05&hotel=NY279&nadult=1&nchild=0

Hack the form action in Contact Form 7 so it adds the search vars to the string,

Then you can grab and use the vars in the page that receives the form.

See Get the GET variables from a URL String