Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You may also need a control to allow multi-select options. Like dropdowns and radios controls described above, the control you generate from the initial schema will be formatted as a text control.  You can make the control a checkbox by changing the control’s Format As property to Checkbox and changing the actual schema typeto xsd:list as shown below:

[[Image:text-toCheckbox-Example-1.png]]Image Added

Code Block
<xsd:element minOccurs="0" name="colorChoice">
      <xsd:simpleType>
           <xsd:list itemType="xsd:string"/>
      </xsd:simpleType>
</xsd:element>

Once the Color Choice control is formatted as a checkbox, a [[ V4_Designing_Forms#Labels |labels property]] will display in the properties settings tab for this control. Enter your checkbox options here.

[[Image:text-toCheckbox-Example-2.png]]Image Added

Limitations

...

Tip

Currently it is not possible to list the options directly in the schema

...

or to have a checkbox option containing a space. So a label of "dark blue" will appear in the database as "dark_blue".

 

Changing text controls to date Controls

...

Code Block
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.frevvo.com/database/Customer" 
targetNamespace="http://www.frevvo.com/database/Customer">
    <xsd:element name="Customers"> 
       <xsd:complexType> 
          <xsd:sequence> <xsd:element maxOccurs="unbounded
             <xsd:element maxOccurs="unbounded" name="row"> 
                <xsd:complexType> 
                   <xsd:sequence

Since the schema says the element is unbounded, the control you generate initially will be a repeat control.  You’ll see the Repeat Row heading in the Forms Designer and if you don’t make any changes, users will see the + sign that comes with repeat controls.

[[Image:Customers_repeat_control.png]]

In this

Image Added

In this case, change the schema to indicate you only want to work with one customer at a time, as shown below.     

Code Block
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.frevvo.com/database/Customer" 
targetNamespace="http://www.frevvo.com/database/Customer"> 
    <xsd:element name="Customer">> 
       <xsd:complexType> 
          <xsd:sequence> 
             <xsd:element maxOccurs="1" name="row"> 
                <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="1" name="row"> <xsd:complexType>
                   <xsd:sequence>

Note that now maxOccurs="1" and that will force the + sign to disappear.

...

See the documentation for Data Sources and Schemas a solution for implementing show/hide with [[V4_Data_Sources_and_Schemas#Required_Controls | required controls]].[[Image:18px-Attention_niels_epting.svg.png]] '''NOTE:'''

Warning

Avoid using message control inside of a section that contains other controls that you may want to set to required/not required (either via the Forms Designer or using [[V4_Business_Rules | business rules]]). Since a message control always contains a value, it can cause a section, or other controls in a section, to become required. If you must include a message control, place it outside the section. Another alternative is to write rules for the individual controls within a section to set them to visibile/invisibile or required/not required.

...