Hide ACF fields until the user makes a choice in when creating a post?

Hi,does anybody know if it is possible to hide certain fields when creating a post? Like for example when the user clicks a certain checkbox, another two fields appear.

jquery.
use toggle class.
https://api.jquery.com/toggleClass/
more info or a live page would be helpful.

Hi, thx for the answer.

I know about toggleClass but the ACF fields (note this is in wp-admin) doesn’t seem to listen to my jquery.
In the create field options in ACF i can give the field-wrapper a class, but if i target this class in my theme javascript file with for example:

$('.js-acf-field').hide();

It seem to ignore this.

ok sorry. didn’t realize that you actually wanted int the admin are. 10% thought that was what you meant. But I guessed wrong.
Off the bat i’d say no.
I’d also wander what is the issue that would make want to do that?
If you are using the plugin ACF and not just the custom fields (you probably are, but there is also the native ACF option) you could use the tab option if organization & visibility is the issue.
There might be what you asked for, but I have not played enough w/ACF to know.
D

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.