Mobile Dynamic Form

This SmartDevicesPlus feature allows GeneXus users to build data display or data entry forms using dynamic fileds, which can be loaded in various ways. With this feature the user can choose which fields and in which order the fields are shown, even in runtime. This is accomplish by loading a custom SDT provided by SmartDevicesPlus.

MobileDynamicFormImg01

Compatibility

This feature is available since SmartDevicesPlus version 2.3 and is compatible with GeneXus X Evolution 3 and Genexus 15.

 

MDF Template

The simpliest way to create a Mobile Dynamic Form is to use the template wizard. Just open the template wizard and select "Mobile Dynamic Form" in the "Other" category.

MobileDynamicFormImg02

Data Source

Once the the template is applied, you must indicate wich fields are displayed.

SmartDevicesPlus MDF loads the fields using the SDT "MDFDynamicField". You will have to load this SDT with the data you want to display in the form. Tipically, this will be done in the start or refresh event.

MobileDynamicFormImg03

For each field you will have to indicate:

  • Name and id: This will identify the field.
  • Description: Text displayed in the form label.
  • Type: Data type of the field. Must be a value from the domain SDPMDFFieldType (Character, Numeric, Decimal, Date, Boolean, Combo)
  • Value: Default value for the field. Use the value according to the data type.
  • Enabled: Define if the field can be edited or not
  • Required: Defines if the field is required

SmartDevicesPlus provides a procedure that shows some examples of how you can load the SDT. Please open the procedure "MDFLoadSampleFields" and check the sample. 

MobileDynamicFormImg04

But, you can also load fields from a table. e.g. if you have a table with Questions from a survey you can load like this:

MobileDynamicFormImg05

Visual Customization

By default all fields in the Dynamic Form will have the same look and feel. You can customize the UI for each field by using the following options in the SDT:

  • MDFDynamicFieldClass: Name of the theme class that will be applied to the field.
  • MDFDynamicFieldDescriptionClass: Name of the theme class that will be applied to the field label.