Hello everybody,
As part of an optimization of procedures, I am looking to link three forms created with ACF and coupled with Advanced Custom Fields: Extended for the creation of custom post types (CPT) where data needs to be “forced”.
Form 1: Team Creation
I have a CPT “teams” that records data from a “team creation” form containing a group of “teams” fields which. In this form, partners are asked to create a team. Two actions are linked to the submission of the questionnaire: a user action where a user is created and an article action where an article is created and inserted into the CPT “teams”.
Form 2: Individual Registration
I have a CPT “cyclist” that records data from an “individual registration” form containing a group of “registered” fields where we ask, among other things, to select a team created by the previous form. Two actions are linked to the submission of the questionnaire: a user action where a user is created and an article action where an article is created and inserted into the CPT “cyclist”.
In my group of “registered” fields, I have a “team” field of type “post object” filtered on the “team” post type, which allows me, in the form, to enable the selection of a previously created team via a dropdown list. (I couldn’t get a dropdown list using a “relationship” field). At this stage, I encounter two difficulties. First, a user can link to multiple teams if they fill out the registration form several times. Second, if anyone erase an account, it doesn’t erase the content in the CPT “cyclist”.
=> How can I ensure that a user cannot fill out a registration form a second time? Is it possible (via the back office rather than through code) to make sure that an individual who wants to re-register with the same email address is refused a new registration?
Form 3 : Creation of a Trip Form
I have a CPT “trips” that records data from a “completed trips” form containing a group of “trip” fields.
Here, I would like:
The form to be filled out only by cyclists who have previously registered;
The form to display two non-editable fields:
A “cyclist” field which would be the concatenation of the “first name” and “last name” fields (display name in database) filled in via the “individual registration” form.
The “team” field that was selected via the “individual registration” form.
I imagine there is a link with “acf/save_post” but I do not understand how to use it or if this action is available in the backoffice user interface, without coding.
The cyclist to be able to add trips as they complete them. I imagine a repeater will be needed but I do not yet know how to exploit it.
I would appreciate some help as I am a beginner and not very comfortable with code. I can’t find anything conclusive in my research, because I don’t understand where I have to put the codes I found (function.php from the child theme ?).
Thank you in advance for any help you could give me, mainly if this help is brought with step by step explanations.
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
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.