Title: Condition For Submit Button
Last modified: November 13, 2024

---

# Condition For Submit Button

 *  Resolved [gshif](https://wordpress.org/support/users/gshif/)
 * (@gshif)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/condition-for-submit-button/)
 * I would like to create a condition where the “SUBMIT” button in CF7 is hidden
   unless the user answer the question correctly.
 * Example: Q: A Panda Bear is White & _____________ If user insert black (not case
   sensitive) than show “submit” other wise hide the submit button
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcondition-for-submit-button%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/condition-for-submit-button/#post-18146537)
 * Sure. You can add the submit button inside a group, and then add the condition:“
   show group if field equals Black”.
 * Example: [https://conditional-fields-cf7.bdwm.be/form-tester/?hash=a1be22d245b8daa76e6da92bc244323b](https://conditional-fields-cf7.bdwm.be/form-tester/?hash=a1be22d245b8daa76e6da92bc244323b)
 * Form:
 *     ```wp-block-code
       Q: A Panda Bear is White & ... [text t].[group s][submit][/group]
       ```
   
 * Conditions:
 *     ```wp-block-code
       show [s] if [t] equals "black"show [s] if [t] equals "Black"
       ```
   
 * Note that people will still be able to submit the form by pressing Enter though.
   This might be okay for a simple quiz or game, but if you can’t allow this, you
   will need to write some server side validation: [https://contactform7.com/2015/03/28/custom-validation/](https://contactform7.com/2015/03/28/custom-validation/).
   Or, you might be interested in using the quiz field, which is builtin to CF7:
   [https://contactform7.com/quiz/](https://contactform7.com/quiz/)

Viewing 1 replies (of 1 total)

The topic ‘Condition For Submit Button’ 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/)

## Tags

 * [condition](https://wordpress.org/support/topic-tag/condition/)
 * [hide button](https://wordpress.org/support/topic-tag/hide-button/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/condition-for-submit-button/#post-18146537)
 * Status: resolved