title: Post non-input fields in a form?
body: <p>This seems like a simple thing, and maybe I'm just not thinking straight today, but right now I don't see it: How do I post data from a form (in a PHP application) that is not an input field?</p>
  
  <p>The reason I need this is I have a form where the user adds some information in input fields, and this should then update other values in the form based on what the user has entered (doing calculations on this input). This data should then on submit be posted, along with the input from the user.</p>
  
  <p>I tried using form labels, but could not get it to work. For one I couldn't get the value of the form in the jQuery using either .val() or .text(). And I'm not sure if I could get the values of the label in the CodeIgniter function anyway. I also tried simple <code>&lt;p&gt;</code> tags with ids, but that didn't work. I guess it has to be an element with the name attribute...</p>
  
  <p>I'm using a helper in CodeIgniter to get the form values, like so:</p>
  
  <pre><code>$this-&gt;input-&gt;post('user')
  </code></pre>
  
  <p>This works fine for input fields, but as explained I need it for non-input elements. Of course I could have input fields that I update in jQuery, but there's a risk that the users will think they should fill them in...</p>
  
  <p>So how do you do it?</p>