The following example will create a contact form
Remarks |
I started to write the contact form almost a year ago. It contained just text boxes and labels and nothing more to it. Waqar created a contact form as well, and I wanted to do the same thing, but with inherent Google Apps Script code. I ended up
using many different pieces of code.
using many different pieces of code.
- All input is validated through a clienthandler, when something changes (through the change handler).
- Only when the input is "OK", then the hidden textbox (createHidden doesn't seem to work) is set to contain a '1'.
- When all fields have valid entries, then the sum of those is validate, through validateSum (needs to have 4)
- Only then, the submit button is shown.
- The submit button, in combination with a form panel, passes on all info to the doPost(e) (no handler needed on the
submit button).
- class client handler (no particular order)
- forTargets
- setText
- validateEmail
- validateLength
- validateNotEmail
- validateSum
- validateMatches
- validateNotMatches
- validateNumber
- validateNotNumber
- class submit button
See contact form in action: Contact Form