• Resolved kzou13

    (@kzou13)


    Hello,
    I spent a day in order to be able to retrieve the value of a checkbox during the validation of the form.

    I have a javascript script :
    jQuery (document) .on (‘click’, ‘.wpcf7-submit’, function (e)”

    I can retrieve data from textbox, however I cannot tell if a checkbox is checked.

    In the form I wrote it like this: [urgent checkbox id: urgent “URGENT”]

    I tried :
    if (document.getElementById (“urgent”) == true) {
    urgent = “& urgent = URGENT”;
    }

    It returns “undefined”.

    When I inspect the checkbox in HTML I see this :
    <input type = “checkbox” name = “urgent[]” value = “URGENT”>

    If you have the solution it would help me a lot …
    Thank you ! 🙂

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Checkbox checked in Javascript’ is closed to new replies.