Home › Forums › General Issues › Disabled option for select fields › Reply To: Disabled option for select fields
I’m assuming that you are using ACF4 because you indicate that you cannot add field to the user registration form. ACF5 can add custom fields to the user registration form.
ACF5 does not however have a way to add a disabled option in the select field.
I think that this can be simulated by setting the field to required and to not allow null values and then using an acf/load_field filter to insert a null entry into the beginning of the selections https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/. While the first item would be selective, validation would fail submitted with it selected. I haven’t tested this, but it seems like it should work.
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.