Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a lengthy form config for my widget so I thought about using radio buttons to hide and show the relevant input fields instead of having them all after each other. But it doesn't seem to work. I suppose it is because the form is loaded with ajax? Is there a way to get it to work?

Take a look at the code here: http://jsfiddle.net/JmVL3/

share|improve this question
What does your browser's debugger say? – toscho Sep 26 '12 at 22:59
It doesn't say anything. Neither firebug or chrome gives any errors. I've just noticed that it works fine to alert a message instead of hiding/showing the input field when clicking the radio buttons. – John Sep 26 '12 at 23:05
It also works everywhere else on the admin page. Just not inside the widget settings. I tried to use .ajaxsucces() around the code but it didn't seem to help. – John Sep 26 '12 at 23:13
Another thing. It also works if i enable accessibility mode. – John Sep 26 '12 at 23:23
@toscho, I can reproduce the issue, it is possible to see the manipulations happening in the Html code (i.e.: $("#field2").css('display','block');), but the widget form shows no change... – brasofilo Nov 10 '12 at 23:30

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.