We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Hi,

    It seems that I have to do some custom validation because some values are necessary only if a radio box is checked and others are necessary if another radio box is checked.

    The only way I see this happen is by custom validating the form. Are there other solutions that do not need me to create custom functions?

    Since I need to create custom validations is there a way to use the validation functions that eform uses.

    Thx
      • 30223
      • 1,010 Posts
      The easiest way to do this is to make none of those fields required initially, That way eForm will validate them if there is a value but won’t bother about the empty fields.

      Then use the eFormOnValidate event to check if the correct fields are filled in and generate an error message if not. As any existing values have already been validated you can keep that function relatively simple.