• Resolved kimparsells

    (@kimparsells)


    Hello. Is it possible to make it so that the end user cannot submit the form if they should answer a question a certain way? https://lewisclarkhealth.org/test/ In this example, I’d like it so that the end user can only submit the form if they answer the question yes. If they answer it no, I’d like for a statement to appear and for them to be unable to submit the form.

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

Viewing 1 replies (of 1 total)
  • Hi Kim,

    Yes, it is possible it can be done with Conditional logic.

    We can show/hide submit button with conditions or disable it with custome js

    document.querySelector(‘#wdform_2_element300’).addEventListener(‘change’, function () {
    if ( document.querySelector(‘#wdform_2_element300’).checked ) {
    document.querySelector(‘.button-submit’).setAttribute(‘disabled’, ‘disabled’)
    }
    else {
    document.querySelector(‘.button-submit’).removeAttribute(‘disabled’)
    }
    }
    where wdform_2_element300 checkbox id`

    Or just using Conditional Logic option.

    Sincerely,

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional answer to submit form’ is closed to new replies.