The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Contact Form 7
Javascript confirm box on checkbox click (3 posts)

  1. abubu
    Posted 2 years ago #

    Hi, i have this checkbox:

    [checkbox* obj exclusive use_label_element "A|a@example.com" "B|b@example.com" "C|c@example.com"]

    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?


  2. buzztone
    Posted 2 years ago #

    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.

  3. abubu
    Posted 2 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.