Hmm that’s alot of work and ugly code. First of all thank you for responding to my question. By your answers i was curious how to communicate with ACF trough Ajax?
Didn’t quite see that in the documentation or tutorials. If i would have more control over my ACF fields trough ajax that would great!
Is it hard to update and request fields trough ajax? and can i check for changes?
So that more people on one page can see the change’s without reloading the page.
i just use update_field() at the moment and i don’t use ajax.
So i make the form and update with $_POST.
Somebody got ideas?
Frontend and without the acf_form() so i can style it properly.
I want logged in users to edit their posts that have extra fields but they don’t get succes or error messages when the fields are or aren’t updated. Returning an error is also vey helpful for me if something goes wrong so i can fix it.
Also this ‘fields’ consist out of a repeater field and i already had some trouble with not adding and it took a long time to figure out why.
Or what is the proper way to inform the frontend that the code is succesfully updated or added?
Hi Jonathan,
Thanks for your reaction and i’m going to try your code right now!
Is there also a way i can also return a Error when there is no Succes? Preferably also with an error code for me as a developer to keep everything stabble.
Thanks again
I made a workaround with an true or not true field so that it looks like the row is deleted.
From a developers perspective i can understand why the function doesn’t work so i don’t think it’s a bug or something. It’s just hard to change all the row fields by one function. When you use acf_form() it’s easy to delete because the other fields get saved to.
It only deletes the row when it is the last row.
But when i want to delete the second row and not the first or the third it just clears the second row.
I fixed the bug. Is it true that delete_row() only clears all fields and not removing the entire row?
I’m using ACF PRO 5.3.3.2 btw. I have the feeling this is more like a bug?
This stil didn’t solve the issue. When i try use 1 or 2 as parameter it stil always deletes the last row.
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.