Support » Plugin: Contact Form 7 » Javascript confirm box on checkbox click

  • Hi, i have this checkbox:

    [checkbox* obj exclusive use_label_element “A|” “B|” “C|”]

    What i wish to do is display a Javascript confirm box that displays when the user select one of the 3 checkboxes.

    For ex: if i click on A, i want a confirm that says “Did you already try to do semething?” -> Yes = close de confirm box and continue with the contact form -> No = close the confirm box and open a new page with a given URL.

    Also, would it be possible to hide the form until one of the checkbox has been selected?

Viewing 2 replies - 1 through 2 (of 2 total)
  • This sort of conditional logic is not available directly in Contact Form 7. It can be done via custom programing but you would need to be rather skilled at WordPress development using PHP.

    Some of the premium Form plugins do offer Conditional Logic including Gravity Forms, Quform and Ninja Forms.

    thanks for your reply…so…as i have to put hand on the code…how can i assign an id to a single checkbox so that i can call a javascript event once somebody click on it?

    if i use id:something the id should be assigne to each one of the checkboxes…right?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Javascript confirm box on checkbox click’ is closed to new replies.