title: Set class or ID on <h:inputHidden> in JSF
body: <p>I'm trying to set a class or id parameter on a <code>&lt;h:inputHidden&gt;</code> in JSF. The code looks like this:</p>
  
  <pre><code>&lt;h:inputHidden value="#{getData.name}" class="targ" /&gt;
  </code></pre>
  
  <p>But in the browser, the class isn't set:</p>
  
  <pre><code>&lt;input type="hidden" name="j_idt6" value="j_idt6"&gt;
  </code></pre>
  
  <p>I need to set a class to this parameter, because I have a JavaScript autocomplete function for a <code>&lt;h:inputText&gt;</code> that sets a value in the hidden input, which needs to be passed in the next page.</p>
  
  <p>Any ideas? Thanks!</p>