There's a good article on form functionality in HTML.
Below are listed several demos on howto handle forms within the framework while writing your apps.
You can use these examples for your own implementations.
FormUrlEncodedEnctypePostMethodController controller capable of handling form with method POST and enctype application/x-www-form-urlencoded submission.
FormGetMethodController controller capable of handling form with method GET and without enctype specified. Most reliable method for submitting the form, works among all popular browsers.
FormMultipartEnctypePostMethodController controller capable of handling form with method POST and multipart/form-data enctype.
Note: Even though such kind of form by spec supports file upload, in practice it won't work, however, server by itself, supports file upload.