<p>I have a section (single) that uses a template that shows information from the entry and includes a form (uses entry form) that posts to a different section (event registration info). All is fine as long as the form data is valid.</p>

<p>If the form is submitted such that it throws an error (required field not filled in), the user is redirected back to the original page, but only the form is displayed and there is apparently no entry ID passed when reloading the template.</p>

<p>Any ideas would be appreciated! </p>

<p>Here is the template code for the form - note that the form handles a number of different event registrations, hence the variables for the redirect and the section Id for posting the form contents:</p>

<pre><code>&lt;form id="eventReg" method="post" action="" enctype="multipart/form-data" accept-charset="UTF-8"&gt;
                        {{ getCsrfInput() }}
                        &lt;input type="hidden" name="action" value="entries/saveEntry"&gt;
                        &lt;input id="theRedirect" type="hidden" name="redirect" value="{{ theRedirect }}"&gt;
                        &lt;input type="hidden" name="sectionId" value="{{ section }}"&gt;
</code></pre>

CC BY-SA 3.0
2016-12-15T03:27:07.930Z
Can you post your form tag definition as well as any hidden inputs inside the form?
Brad Bell
CC BY-SA 3.0
2016-12-15T07:36:53.263Z
I'd test what happens with a set of hard coded values for your variables.
carlcs
CC BY-SA 3.0
2016-12-19T21:31:05.690Z
Ran a couple of different tests and it appears that if you have an Entry Form on a page that also includes content from some other Entry (like instructions), and, if upon submission the Entry Form returns an error, the original page will reload with an Entry ID equal to that which was set in the SectionID parameter of the form. Brad, could you please confirm that is true?
Roi Agneta
<form><entry>
Form Error Causes Page to Reload Without an Entry ID
# Form Error Causes Page to Reload Without an Entry ID

(Asked by: username_0 on 2016-12-15)

I have a section (single) that uses a template that shows information from the entry and includes a form (uses entry form) that posts to a different section (event registration info). All is fine as long as the form data is valid.
If the form is submitted such that it throws an error (required field not filled in), the user is redirected back to the original page, but only the form is displayed and there is apparently no entry ID passed when reloading the template.
Any ideas would be appreciated! 
Here is the template code for the form - note that the form handles a number of different event registrations, hence the variables for the redirect and the section Id for posting the form contents:

                        {{ getCsrfInput() }}

**Tags:** form, entry

> **Comments:**
> **username_1**: Can you post your form tag definition as well as any hidden inputs inside the form?  
> **username_2**: I'd test what happens with a set of hard coded values for your variables.  
> **username_0**: Ran a couple of different tests and it appears that if you have an Entry Form on a page that also includes content from some other Entry (like instructions), and, if upon submission the Entry Form returns an error, the original page will reload with an Entry ID equal to that which was set in the SectionID parameter of the form. Brad, could you please confirm that is true?  

---

## 0 answers

