• Resolved rahimkp

    (@rahimkp)


    Am trying to add an on change event listener to a select element using addEventListener.

    The event listener is added but does not fire.

    The exact same code placed out of the Contact Form 7 form works flawlessly.

    Any clues would be highly appreciated.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • hi @rahimkp

    you probably want to do somthing like this:
    https://codepen.io/erikyo/pen/ZEedEWB

    tip: you need to compile es6 in order to use arrow functions. I found wp-scripts very useful for these but there is a shorter way like described in the example

    • This reply was modified 3 years, 8 months ago by Erik.
    Thread Starter rahimkp

    (@rahimkp)

    Hi Erik,

    Thanks for your response.

    The code works perfectly by itself.

    Within a CF7 form though the contact form 7 event handlers seem to be preventing the new event handlers from firing.

    Thread Starter rahimkp

    (@rahimkp)

    The problem seems to be theme specific.

    Thanks for your help.

    Rahim

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Event Listeners not firing in Contact Form 7’ is closed to new replies.