Closed daviddarke closed 7 years ago
This is a brilliant idea, David! Thanks for contributing.
Will merge and add it to the documentation a little later. :)
I also added the option to exclude fields based on their names: 7d8566712e91ab2d4724905af3e66d609e8f6569
👍
So... I've actually used this twice (on two separate sites) this week. I have a signup form that includes:
These fields are saved in an ACF field group that is then assigned to a user 'signup form' and a 'profile edit form'.
When a user signs up and the form gets processed, I create a new user and allocate the crucial data (First Name, Last Name and Email) to the actual user account, and the other fields just to standard custom field on the user.
Once the user is signed up, there is an edit form on their profile. I do not want them to edit their email address assigned to their account. So I can pass the field reference into the 'exclude_fields' arg and that field is skipped from rendering and validation on just the edit form. Like:
Give it a spin and let me know your thoughts :)