Wordpress (Contact form 7)
I have one submit button know, that has a redirect to a page: on_sent_ok: "location = 'http://xxxxxxxxxxx.com/xxxx/?page_id=1';"
Know I wanna know if its possible to have one more submit button in the same form redirecting to another page?
Or Is It possible to do it without using on_sent_ok:?
Yes, it is possible, you have to name your button and add a value to it. That will be sent with the form. On the server you can check what button was pressed by checking which button name (and value) is present in the request parameters.
For example:
HTML on the client:
PHP on the server
note:
If you want to send the same form using completely different actions, then you have to use javascript
onsubmit
or a non-submit button withonclick
to change the form action, or send the data with AJAX.