This is an example form web app, the client-side bit shows some basic UX design, such as a disabled submit button when the form is submitting, or an error message if it fails...etc
The Apps Script bit is very basic. It contains just the code necessary to serve up the html, and to validate the field.
Here is a link to this example app in action: Example Apps Script Form
Note: You must be signed into a Google account.
The Apps Script file structure is as so: