You can use the acf_form() function with the “form” option set to false. This will allow you to show the input fields without generating the form. That way you can add it to the Restrict Content Pro’s form.
But please keep in mind that this will only show the input fields. It won’t process the data. To process the data, you need to follow the guide in the link you’ve shared.
Sorry im not sure i explained myself too well. The custom fields are for the back-end. Iv used the acf_form() function before, but thats for displaying the form on the front end isnt it?
I just need to register the new custom fields in the members section of the backend, which is basically like the ‘Users’ section.
I wasnt sure as well if i could create a rule within ACF to display it in ‘Members’? Like you can assign it to a ‘User Form’ i didnt know if it would be an easier way to set up a rule to display it in the members?
ACF has a feature that allows you to create a custom location rule, but it depends on how Restrict Content Pro adds the Members page. You can only show the rule for an edit screen (page / post / user / taxonomy / attachment / etc). This page should give you more idea about it: https://www.advancedcustomfields.com/resources/custom-location-rules/.
If the Members page is not an edit screen, then the only thing you can do is to use the acf_form() with the “form” option set to false. Please bear in mind that you can use acf_form() on the backend too, but you need the correct way to process the data.
I hope this make sense 🙂
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users