Topic: How to define checkboxes in schema?

I want one field from a database table to be shown as a checkbox group in a repeater control. Is this possible? There's an example in the documentation (see below), but it doesn't work. It will get rendered as a normal text field. I can change it to dropdown in the form designer, but it won't show any options. Changing the type to check box won't show any data.

<xsd:element minOccurs="0" name="colorChoice">
      <xsd:simpleType>
           <xsd:list itemType="colorTypes"/>
      </xsd:simpleType>
</xsd:element>

<xsd:simpleType name="colorTypes">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="red"/>
       <xsd:enumeration value="green"/>
       <xsd:enumeration value="dark.blue"/>
      </xsd:restriction>
 </xsd:simpleType>

Re: How to define checkboxes in schema?

Hi Antti,

Apologies this is a bug in the docs for Live Forms v3.4.x. You can create a checkbox control that maps to a database Varchar field to create rows as well as initialize your form from the database Varchar as follows:

1) change the <xsd:string minOccurs="0" name="colorChoice"/> to the following:

<xsd:element minOccurs="0" name="classes">
         <xsd:simpleType>
                     <xsd:list itemType="xsd:string"/>
          </xsd:simpleType>
</xsd:element>

2) Don't bother defining the enumeration in the XSD. You can now control this directly from within the frevvo Form Designer

3) Edit you form and select "Format As" "Checkbox" on the color choices control

4) Once you select this format as, the control will have a new "Labels" property. Enter the choices into the labels property.

Re: How to define checkboxes in schema?

this really is such a very helpful information...