May 2015
Intermediate to advanced
112 pages
2h 14m
English
We are going to add one more input to our form, which will be for the user's description. In the description, we will parse for things, such as e-mails, and then create both a plain text and HTML version of the user's description.
The HTML for this form is pretty straightforward; we will be using a standard textbox and give it an appropriate field:
Description: <br /> <textarea id="description_field"></textarea><br />
Next, let's start with the bare scaffold needed to begin processing the form data:
function process_description() { var field = document.getElementById("description_field"); var description = field.value; data.text_description = description; // More Processing Here data.html_description = "<p>" + description + "</p>"; ...Read now
Unlock full access