Title: input type=&#8221;hidden&#8221; validation problem
Last modified: August 18, 2016

---

# input type=”hidden” validation problem

 *  Resolved [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/)
 * I’m using a rework of the Relaxed 1.0 theme by DL2 Media on one of my client 
   sites. I’ve widgetized the theme, and it’s now throwing this error in the [http://validator.w3.org/](http://validator.w3.org/)
   routine:
 * Error Line 54 column 168: document type does not allow element “input” here; 
   missing one of “ins”, “del”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “p”, “div”, “
   address”, “fieldset” start-tag.
 * `...="98e3add0e67e37aa0849ddb9662cac78" />`.
 * Viewing the source of the error shows this:
 * `<form method="get" id="searchform" action="http://clientsite.org/wordpress/"
   ><input type="hidden" name="PHPSESSID" value="ea3e57cb9fa1b4d4a54b3ca546aef2ea"/
   >`
 * I have gone through every file in the entire wordpress installation. I can’t 
   find where this particular input is getting added. I can see that probably the
   input is hidden to keep the PHPSESSID from erroring out, but not having the input
   enclosed in either a div or p tagset is causing the other error I’m getting.
 * Anyone have any idea where this is set up in wp? At this point I’m assuming it
   must be in the core files. [Oh – btw, I’ve actually widgetized my own preferred
   searchform setup, but it was throwing this error with the in-built search widget
   too – in fact, that was why I widgetized my search to begin with, but obviously
   it didn’t help….]

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455037)
 * Does it have to have that session thing? In other themes the searchform doesn’t
   have it and it still works…
    What happens if you delete that whole line?
 *  Thread Starter [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455039)
 * That’s the problem: the line isn’t there in the searchform. This is the entire
   content of the searchform.php file:
 * `<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <div
   > <input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id
   ="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form
   >
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455040)
 * Mine is like this:
    `<form method="get" id="searchform" action="<?php echo $_SERVER['
   PHP_SELF']; ?>"> <div><input type="text" value="<?php echo wp_specialchars($s,
   1); ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search"/
   > </div> </form>
 *  Thread Starter [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455041)
 * Yup, tried that one too. I guess you’re not getting a validation error, huh?
 *  [Pizdin Dim](https://wordpress.org/support/users/pizdin_dim/)
 * (@pizdin_dim)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455050)
 * > _“I can’t find where this particular input is getting added.”_
 * I believe PHP generates that when the cookies are disabled according to your 
   php.ini file. Check the values of “session.use_cookies”, “session.use_only_cookies”
   and “session.use_trans_sid”. I can’t check my configuration at the moment but
   I’d suggest the first two should be “1” and the last “0”.
 * If you’re running in a shared hosting environment, an alternative could be to
   set those three variables in your own htaccess file instead.
 *  Thread Starter [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455056)
 * I don’t have access to php.ini on this provider setup. How would I write this
   into .htaccess (being’s I’m not all that bright when it comes to that stuff, 
   I hope you can help….)
 * Thanks!
 *  [Pizdin Dim](https://wordpress.org/support/users/pizdin_dim/)
 * (@pizdin_dim)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455062)
 * Try this:
    ` php_value session.use_cookies 1 php_value session.use_only_cookies
   1 php_value session.use_trans_sid 0
 *  Thread Starter [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455063)
 * Okay, let me give that a shot…. thanks for your help.
 * [Edit: REALLY thank you! That fixed it. I’m thinking it must be something with
   the provider on this domain, since I have this exact setup elsewhere with valid
   code, no problems at all. Bless you!]

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘input type=”hidden” validation problem’ is closed to new replies.

## Tags

 * [Searchform](https://wordpress.org/support/topic-tag/searchform/)

 * 8 replies
 * 3 participants
 * Last reply from: [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/input-typehidden-validation-problem/#post-455063)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
