Tech Support Guy banner
Status
Not open for further replies.
1 - 5 of 5 Posts

· Registered
Joined
·
750 Posts
Discussion Starter · #1 ·
I'm processing a form using PHP and running into problems with hidden inputs. Basically, if I have the at the bottom of the form it works fine, but if I stick the same thing further up the form (eg in between 2 text inputs) it doesn't pass the variable over to the next page.
Is this right?
 

· Registered
Joined
·
2,384 Posts
Is there any reason you want them iwithin the fileds?

Hidden fields should be at the top of your form just after the tag.
eg:
Code:
<form name="frmForm" action="/form.php" method='post' enctype='multipart/form-data'>
<input type='hidden' name='formmail_submit' value='Y'>
<input type='hidden' name='esh_formmail_subject' value="Contact">
<input type='hidden' name='esh_formmail_cc' value="[email protected]">
<input type='hidden' name='esh_formmail_bcc' value="">
<input type='hidden' name='esh_formmail_return_subject' value="Received - Do Not Reply!">
<input type='hidden' name='esh_formmail_return_msg' value="Your message to our Webmaster was received, thank you.">
<input type='hidden' name='esh_formmail_mail_and_file' value="">
<input type='hidden' name='esh_formmail_charset' value="UTF-8">
 

· Registered
Joined
·
750 Posts
Discussion Starter · #3 ·
Why can't they be at the bottom, before the Submit button?
I haven't tried them at the top, but for the purposes of laying out my PHP better I was trying to have hidden fields at various places throughout the form. I found they would not be passed over like that (even when they showed up correctly in the page source!) and so had to move them to the bottom.
Have you tried it?
 
1 - 5 of 5 Posts
Status
Not open for further replies.
Top