Yeah, the checkboxes will make it much easier for the user, I think. Having a multiselect with so many options might get tricky for them.
So in the ACF field settings at the bottom I set the wrapper id on the states field to ‘states’ and the wrapper id on the counties to ‘counties’.. I know, I’m crazy like that.
I’m not quite sure wher to put the code to hide the field. I tried a few things and they failed. This is the code that renders the form and allows the user to update:
<h2> <?php _e('Update Your Service Area(s)','boxtheme');?></h2> <?php acf_form(array( 'post_id' => 'user_'.$current_user->ID, // set the post id to show 'field_groups' => array('key' => 'group_5a33e0fd2fe49',), 'updated_message' => __("", 'acf'), 'submit_value' => 'Update Your Service Area(s)' )); ?>
This is just a look at the code above and how it renders the page.
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!