80 likes | 177 Vues
OSP Form Building Bootcamp. August 5, 2008. Components of an OSP Form. Instructions (added in Forms Tool wysiwyg editor) XSD, aka schema (uploaded and attached to form in Forms Tool) Custom renderer XSL (uploaded and attached to form in Forms Tool. The Forms Tool. The XSD file.
E N D
OSP Form Building Bootcamp August 5, 2008
Components of an OSP Form • Instructions (added in Forms Tool wysiwyg editor) • XSD, aka schema (uploaded and attached to form in Forms Tool) • Custom renderer XSL (uploaded and attached to form in Forms Tool
The Forms Tool The XSD file Instructions Custom renderers (XSLT files)
Possible HTML Form Elements • Text field • Text area • Rich text area • Radio buttons • Drop down list (multi-select, if desired) • File upload • Subform • Boolean field • Date field
Parts of an XSD file <element name=“rootElement”> <xs:complexType> <xs:sequence> <xs:elementname=“myTextfield” <xs:annotation> <xs:documentation source="ospi.label">My Label</xs:documentation> </xs:annotation> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="100" /> </xs:restriction></xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </element>
XSD Data Types • xs:string • xs:integer • xs:decimal • xs:date • xs:boolean • xs:anyURI
Restrictions and Indicators • minOccurs (1 = required) • maxOccurs (can have multiple items) • enumeration (like select options) • maxLength (e.g., how many characters can be in a field. Example use: determine how many rows in a textarea.)
XSD v. HTML • xs:date date picker • xs:anyURI file upload button • xs:string < 100 characters textfield ≥ 100 character text area isRichText = true FCKeditor < 4 enum, max 1 radio buttons < 4 enum, multiple checkboxes ≥ 4 enum, max 1 dropdown ≥ 4 enum, multiple multi-select