Support

Account

Forum Replies Created

  • Brilliant! The acf/load_value filter worked like a charm.

    Thank you so much!

  • Hi @Elliot Condon

    I’m struggling with this also. I need a way to auto select a value in a Post Object field in the WordPress Admin. My situation is as follows:

    I have two custom post types where one relates to the other via the Post Object field. There are certain situations based on criteria of the viewing user that I want to auto select a value in the Post Object field.

    Is there a way to do this with the Select2 enabled? If not, I would like to be able to disable the Select2 for this field type.

    Is there a way to do this manually in my functions.php?

    Thanks in advance for your help.

  • Actually, I just did some testing. It seems to work in the first way, based on the role of the user you are creating.

    I’m currently an administrator and I set a field for User Location to only show up with the following conditions:

    User Form is equal to Add / Edit AND
    User Role is equal to Administrator

    The User Location field does not show up.

    When I change the second condition to be:

    User Role is equal to Subscriber

    The field shows up

    This is because the default level when creating a new user is Subscriber.

    There just doesn’t seem to be any dynamic logic for when that field changes. Which would be awesome. I can currently function with removing the second condition completely as there are only Admins and Authors.

Viewing 3 posts - 1 through 3 (of 3 total)