Description of the problem
When using Channel Form, I've encountered an issue when using error_handling="inline" and url_title="" where after form submission with a field validation error, the posted data is not returned back to the form as and old value.
If I use entry_id="" instead, the form submits correctly, the validation error appears, and the old value remains in the input field.
How To Reproduce
Steps to reproduce the behaviour:
- Create a channel with a custom text field
- In a template, use the template tag below and set the rules only so that the form validation is triggered and the form doesn't actually succeed and submit the changes.
- Complete the form to force the validation error (in my example, I tested it using the required and numeric validations and then submitted text only)
- Click submit
- The form error shows, but the field value is blank instead of the text entered
Using url_title does not work
{exp:channel:form
url_title="playground"
channel="sandbox"
error_handling="inline"
rules:basic_input="required|numeric"}
<input type="text" name="basic_input" value="{basic_input}" />
{if error:basic_input}
{error:basic_input}
{/if}
<button type="submit">Submit</button>
{/exp:channel:form}
Using entry_id does work
{exp:channel:form
entry_id="1"
channel="sandbox"
error_handling="inline"
rules:basic_input="required|numeric"}
<input type="text" name="basic_input" value="{basic_input}" />
{if error:basic_input}
{error:basic_input}
{/if}
<button type="submit">Submit</button>
{/exp:channel:form}
Environment Details:
- EE Version 7.4.11
- PHP Version 8.2.15
- MySQL Version 8.0.27
- OS: Mac OS Sonoma
- Web Server: nginx
Description of the problem
When using Channel Form, I've encountered an issue when using
error_handling="inline"andurl_title=""where after form submission with a field validation error, the posted data is not returned back to the form as and old value.If I use
entry_id=""instead, the form submits correctly, the validation error appears, and the old value remains in the input field.How To Reproduce
Steps to reproduce the behaviour:
Using url_title does not work
Using entry_id does work
Environment Details: