Jump to content

[SOLVED] W3 Validation Failing on Form due to Hidden input


ratgurrl

Recommended Posts

I am getting one error when I try to validate my page.

 

document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag

 

This is because on line 30, a hidden input field is being added after the form tag.  I am not able to get a DIV or other tag around this no matter where I place it.  What can I do to fix this.

 

Line30 <form method="post" action=""><input type="hidden" name="PHPSESSID" value="9bdffa610943a72baa8b5555bdec4a1d" />

 

 

Jen

 

I fixed it.

 

I added the following to my config.php file...

 

ini_set('arg_separator.output', '&'); //already had this
ini_set('url_rewriter.tags', 'a=href,area=href,frame=src,input=src'); //Added this to fix the form validation

 

Then, manually added the php session input field into my form...

 

<input type="hidden" name="PHPSESSID" value="'.session_id().'" />

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.