Home Forums General Issues Manipulate select field via js


Manipulate select field via js

  • Hi, I’m trying to manipulate the behavior of two select fields after checking another radio field.
    Basically, if the radio field is checked, the two selectis must “empty” and self-fill with preset values that I pass.
    I don’t want to analyze why, also considering that it is code that I inherited, but I must necessarily do it through js.
    Is this thing feasible in your opinion?
    I also add that I started to do some “basic” tests trying to make sure that if the radio is checked then it prints an alert; the code is this, but it doesn’t work at all:

    if ($('.acf-field-radio[data-name="risiedo_allestero"] ul.acf-radio-list li label').hasClass("selected")) {

    Thanks for your help.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.