Search code examples
phphtmlwordpresswordpress-shortcodeninja-forms

Wordpress Ninja Form with custom validation on text box


I have a condition to apply validation on, i.e. there will be Four Text boxes in the form, if value is put inside one of the text boxes then other text box's validation will not be required. It is just like radio buttons, if one of the text box is selected to enter details then others can be empty or may be disabled/ Hide. But using Ninja Form & Wordpress. Although if we can enable or disable the text box based on the radio button selection will also work.


Solution

  • Am I correct in understanding you would like fields to be enabled/disabled based on input from a previous field? If this is the case, take a look at the ninja forms add-on Ninja Forms + Conditional Logic.

    Alternatively, if you are looking to make any one of the 4 boxes required, this answer may help