Create Advanced Data Definitions
Often times when capturing information from forms, it is necessary to validate data against a specific type of desired input (e.g. email address) and to provide input fields for items like drop downs, radio buttons, checkboxes, and list boxes. The data definition technology provides a mechanism for each of these items. We want to create an advanced form with these different items.
A. Create an Advanced Data Definition
To create an advanced data definition:
- Go to the Administration area, and select Data Definitions in the left navigation bar.
- Click on New Data Definition.
- For the Name field, type in registration.
- For the XML field, type in:
<system-data-structure>
<text type="checkbox" identifier="preference" label="Preference">
<checkbox-item value="Car" />
<checkbox-item value="Truck" checked="true" />
<checkbox-item value="SUV" />
</text>
<text type="dropdown" identifier="Color" label="Color" default="Blue">
<dropdown-item value="Blue" />
<dropdown-item value="Red" />
<dropdown-item value="Black" />
</text>
<text type="radiobutton" identifier="gender" label="Gender" default="Female">
<radio-item value="Male" />
<radio-item value="Female" />
</text>
<text identifier="email" multiple="false" label="Email" required="true" default="name@company.com" regular-expression="/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/" input-data-format="name@company.com" />
</system-data-structure> - Click Submit to save the new data definition.
- Your new Data Definition is ready to be attached to a page.
Data definitions are a powerful technology that allow for capturing structured information from users. Common examples of data definitions include:
- Frequently asked questions (FAQs)
- Calendar of events
- Job posting
- Survey creator
- Form creator
- Press release
- Real estate listing
- Faculty profile
- Blog entry
- Menu creator
- Slide show
These common data definitions are included with the software.
Thanks for going through Part 4 of the Technical Introduction. Part 5 is available online:
- Learn how to use re-use content with data definitions and index blocks, incorporate scripting languages, use metadata sets, and see built-in example modules