Help Center
    Follow

    Components of a Form

    What is a Form?

    All applications in SureCloud are based on form technology which allows for the display and collection of data. When you interact with a SureCloud application you will almost certainly be interacting with a form of some description. Every form has a unique identifier referred to as Questionnaire Key .

    A form can be one of three types:

    1. Page Layout – These forms display and collect data in a layout similar to the way that web pages are laid out (fig 1).
    2. Table Layout – These forms display lists of items in a grid view. One item per row (fig 2).
    3. Hybrid – These forms combine elements of 1 and 2 from above (fig 3).

    mceclip11.png

    Fig 1: Page Layout form

    mceclip10.png

    Fig 2: Table Layout form

     mceclip12.png

    Fig 3: Hybrid Layout form

     

    What are the major components that make up a form?

    A SureCloud form (regardless of the type) is constructed of just two components; Sections and Responses.

    Sections

    A form will contain one or more sections; every line on a form is its own section. Every section has a unique identifier referred to as Section Key. In order to refer to any section (Section Key) you will need to know the ID of the form it exists on (Questionnaire Key)

     mceclip13.png

    Fig 4: Form and Section illustration

    There are two types of sections:

    1. Standard – These sections are static and are essentially a container to place responses on the screen. A page layout form will exclusively use standard sections.
    2. Insertable – These sections allow a user to define a table or grid. Each row in the table will comprise the responses listed within the insertable section. A table layout form will exclusively use an insertable section.

    A hybrid form will use a combination of standard and insertable sections to create the static and table elements on the screen.

    mceclip14.png

    Fig 5: Standard and Insertable sections

    Responses

    Each section will contain one or more responses. Responses are the elements on screen that either display or collect data. Every response has a unique identifier referred to as Response Key.

    In order to refer to any response (Response Key) you will need to know which section it exists in (Section Key) and the ID of the form (Questionnaire Key).

    mceclip15.png 

    Fig 6: Form, Section and Response illustration

    A response can be any one of the following types: Button, Date, Evidence, Formula, Information, Library Reference, Multiple Users, Multiselect Option List, Option List, Reference, Sequence, Template, Text, User or Value.

    Example Form (broken down)

    The below is an example page layout form:

    mceclip16.png

    Fig 7: Example Form

    This is the same form but with sections highlighted:

    mceclip17.png

    Fig 8: Example Form with sections highlighted

    Again, the same form but with sections and responses highlighted:

    mceclip18.png

    Fig 9: Example Form with sections and responses highlighted

    The below shows a data object with form, section and response key’s defined in order to refer to the “Cause” user input response in the form above (figures 7, 8 and 9):

    {     
    "sections": [

         "key": 1046350995,
             "responses": [
             {
              "key": 4058683364,
                 "value":
    {
                  "value": "case test",
                     "type": "TEXT"
    }
    }]
    }],
          "questionnaireKey": 33553026
    }

     

    Useful links:

    Components of a Form

    API Authentication

    Forms API Overview

    Sections API Overview

     

     

     

    Was this article helpful?
    0 out of 0 found this helpful

    Comments

    Further Questions?