Title: Conditonal redirect
Last modified: April 23, 2020

---

# Conditonal redirect

 *  Resolved [Blipp](https://wordpress.org/support/users/blipp/)
 * (@blipp)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/conditonal-redirect/)
 * I need to create a form that when submitted directs a user to one page if a field
   on a CF7 form contains a certain set of numbers, to another page if not.
 * Alternatively this could perhaps be done on the page where unless the field contains
   a certain set of numbers the form does not submit, but instead gives an error
   message, inviting the user to try again.
 * Does anyone know how this might be possible?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/conditonal-redirect/#post-12720278)
 * Still need to think this trough, but I believe here’s a step in the right direction:
 * You could use the ‘wpcf7mailsent’ event to determine which URL should be visited.
   But first you would need to figure out if the posted data can still be accessed
   via JS after submitting the form.
 * [about the wpcf7mailsent event](https://contactform7.com/redirecting-to-another-url-after-submissions/)

Viewing 1 replies (of 1 total)

The topic ‘Conditonal redirect’ is closed to new replies.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/conditonal-redirect/#post-12720278)
 * Status: resolved