80 likes | 181 Vues
Dive into the crucial components of OSP form building, including instructions, XSD schema, custom renderer XSL files, and various HTML form elements like text fields, radio buttons, and file uploads. Understand the parts of an XSD file, data types, restrictions, and how XSD relates to HTML. Learn about using XSD to create date pickers, file upload buttons, and handling different types of form inputs. This bootcamp will equip you with the knowledge to create dynamic and functional OSP forms effortlessly.
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