• I am trying to validate if the email that is being entered in the form has already been registered in the database. For now I use the invalidate function to create the logic that displays the message that explains the reason for the error.

    The problem is that the invalidate function is also fired when the form is sent blank.

    I need to differentiate between both errors so that i can take different actions if the form is blank or if the email is already registered.

    I have come with the idea of looking for a class on the form tag, i can already look for “invalid” when an error occurs, how can i set a different class.

    I have tried with the wpcf7_form_class_attr hook, but I haven’t been able to make it conditional.

    Please help!

    The page I need help with: [log in to see the link]

  • The topic ‘I need to add a conditional class to the form’ is closed to new replies.