You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thank you for these examples, they have helped me enormously with manupulating some fields on the admin side. Any chance you know how to get the value of a select2 field (im using the taxonomy ACF field). Basically want to change some checkbox group options based on what taxonomy they select. I was able to get most to work but for some reason cant figure out how to get the selected value of this field. See my code below, .Val() comes back null
var selManufacturer = acf.getField('field_629a3d70a424a'); var manufacturer = selManufacturer.val(); console.log(selManufacturer.data); console.log(manufacturer); if (!manufacturer) { // no state selected // don't need to do anything else console.log('no mid found, aborting'); return; }
The text was updated successfully, but these errors were encountered:
First of all thank you for these examples, they have helped me enormously with manupulating some fields on the admin side. Any chance you know how to get the value of a select2 field (im using the taxonomy ACF field). Basically want to change some checkbox group options based on what taxonomy they select. I was able to get most to work but for some reason cant figure out how to get the selected value of this field. See my code below, .Val() comes back null
var selManufacturer = acf.getField('field_629a3d70a424a'); var manufacturer = selManufacturer.val(); console.log(selManufacturer.data); console.log(manufacturer); if (!manufacturer) { // no state selected // don't need to do anything else console.log('no mid found, aborting'); return; }
The text was updated successfully, but these errors were encountered: