title: Simple form with CherryPy
body: <p>I'd want to add a simple form that show a single text area.</p>
  
  <p>When user submit the form I need to call a function that check the validity of the data and elaborate it.</p>
  
  <p>I have added the form in the page in this way:</p>
  
  <pre><code>&lt;td&gt;&lt;form method = "get" action = "getnote"&gt; &lt;input type="text" name="note"/&gt; &lt;button type="submit"&gt;&lt;img src="/img/validate.jpg" width="20" height="20" /&gt;&lt;/button&gt;&lt;/form&gt;&lt;/td&gt;
  </code></pre>
  
  <p>With getnote I want to call a function getnote(note) that check validity and save it in a db.</p>
  
  <p>Then I have :</p>
  
  <pre><code>class HelloWorld(object):
  @cherrypy.expose
  def index(self):
      return "Hello world!"
  
  
  @cherrypy.expose
  def getnote(self, note):
      #check and save
  getnote.exposed = True
  
  @cherrypy.expose
  def HomeP(self):
  
      Session = sessionmaker()
      session = Session(bind=engine)
  
  
      template = loader.load('index.html')
      title = "Home page"
      ctx = Context(title=title)
      return template.generate(ctx).render('html', doctype='html')
  </code></pre>
  
  <p>then in the localhost/HomeP there is the form and is showed correctly, when I fill the form and submit it, the browser show me an error of path "HomeP/getnote/" missing. But I want to call getnote as a function and not as a page!</p>
  
  <p>I have followed this tutorial but maybe there is something that I've missed:
  <a href="http://cherrypy.readthedocs.org/en/latest/tutorials.html#tutorial-4-submit-this-form" rel="nofollow">http://cherrypy.readthedocs.org/en/latest/tutorials.html#tutorial-4-submit-this-form</a></p>
  
  <p>Thanks</p>