I’m using the frontend form functionality and having trouble with updating the fields if the form is initially set to display:none
. I have a small edit icon that when clicked will set the front end form to display:block
. If I amend any data in the fields then click update the field just doesn’t save anything.
Is there a way around this? It’s as if some functionality isn’t firing if the form is initially hidden.
It’s definitely the fact that the form is hidden because if I don’t hide it within a div, it saves data fine.
HI @robteamworks
It would really help if you could share a snippet of some of the code that you have for this form so that I can take a look.
First: I am not familiar with acf_form(), but let´s go trough it.
Is this problem also present in other browsers?
IMHO it is related to a “bug” in jquery using .val()
on fields which are hidden on page load.
One workaround is to use $('#myInput').attr('value', value);
instead, but am I right with the assumption, that the JS comes from acf :D.