LSPS documentation logo
LSPS Documentation
Mobile Forms

LSPS provides support for creating mobile forms so that you can display the forms of LSPS applications in a specific way on a mobile device or display a mobile-friendly version of the form.

Note: If you are creating a mobile LSPS application, do not aspire to substitute the desktop application: the mobile application should be an extension of the desktop application.

Also make sure to follow the common guidelines for mobile applications: keep the forms simple and intuitive.

To create mobile versions of your forms, do the following:

  • In your form, add the Resize Listener to detect the screen size on runtime: from the listener expression, call the getBrowserWindowSize() function to get the width and height of the device screen in DIP (density independent pixel) of the device.
  • Define in the listener how the form components should behave:

    • For adaptive design you can simply hide components, or change their properties.
    • For mobile-dedicated version, consider embedding the form versions for different devices in a layout component and hide and display or hide the layouts from the Resize Listener expression based on the window size.

    Consider using the same binding for the input components in individual Form version to keep any data that the user provides in all form versions. This will allow the system to preserve the input in case a form component is hidden on device resize (the user rotates the device).

Important: If the user provides invalid values in the form and the Form component will be hidden, the invalid values cannot transferred to the displayed form. Consider handling such situations in your form.