Home › Forums › ACF PRO › Javascript get checked radiobutton value › Reply To: Javascript get checked radiobutton value
Hi John,
Thanks for the suggestion; unfortunately I couldn’t get it to work however.
But I did find a solution. It’s not very elegant and I’m sure there are better ways, but this functions at least:
$('#acf-field_55bf6059da1d8').focusin(function () { alert ("default") });
$('#acf-field_55bf6059da1d8-P').focusin(function () { alert ("default") });
$('#acf-field_55bf6059da1d8-D').focusin(function () { alert ("D") });
$('#acf-field_55bf6059da1d8-NP').focusin(function () { alert ("NP") });
And so on. It means a line for each option of course. And for some reason without specifying the value defaults to the first item.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.