Examples of the Gallery-Form Module
Building a Form from Markup
Building a Form in Script
Building a custom Date Field