The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › How to display form value even if there’s an error during submission?
I have fields set as required so that if the form is submitted and those fields are not defined, an error displays.
Unfortunately, any field values that were entered do not redisplay so the user would have to enter them again.
I was able to use the following to get simple fields displaying the value:
But here’s where I run into an issue. How would I get it to work for an array field that has a name like:
The variable $i will be a number that corresponds to the number of the entry. So if 3 ingredient amounts were entered it would be: