Home › Forums › General Issues › make field when form submited › Reply To: make field when form submited
What you’re trying to do will not work.
acf_add_local_field_group() and acf_add_local_field() do not save any information to the database or files. These field groups and fields will only exist on the page load that runs the code. Since you’re running this only when the form is posted, that’s the only time the fields will exist.
If you want this to be persistent then you need to store the information yourself and then load that information on every page load and use it to create the field groups/fields.
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.