title: How to get form field names and values in Python?
body: <p>I have a problem in web page, developed in python.</p>
  
  <p>I have several fields (checkbox, textarea, etc) in form, and each field has some unique names. </p>
  
  <p>I can save the value of known fields  </p>
  
  <p>i.e. </p>
  
  <pre><code>field_name = 'fl_textarea'    
  field_value = form.getvalue(field_name)
  </code></pre>
  
  <p>But how I can get the value of unknown field names ? I also need to save field names into the variable.</p>
  
  <p>When I have printed the contents of submitted form</p>
  
  <pre><code>form = cgi.FieldStorage()
  print "&lt;p&gt;"+ str(form) +"&lt;/p&gt;"
  </code></pre>
  
  <p>It looks like this:</p>
  
  <pre><code>FieldStorage(None, None, MiniFieldStorage('flatt2695', 'abc-xyz'), MiniFieldStorage('flatt2696', 'abc-123xyz'), MiniFieldStorage('flatt2697', 'onoff'), ...
  </code></pre>
  
  <p>So, how I can get these field names and values one by one into the variables ?</p>