Skip to main content

Add a new survey form

This API creates the dynamic survey form.

The form elements can be any of the following types:

  • textinput
  • numberinput
  • textarea
  • checkboxes (Options enablled)
  • radiobuttons (Options enablled)
  • dropdown (Options enablled)
  • datepicker
  • hyperlink (Not input)
  • label (Not input)
  • paragraph (Not input)

Follow the request body description to avoid any type of error.

Request Body

The basic mandatory properties to create a form are:

  • eventid
  • fromname is name of the form
  • ismandatory denotes if the form is mandatory to submit by all users.
  • formjson collection of JSON objects for multiple form fields.

formjson is the core building property for the dynamic form structure. It is an collection of different types of input fields with some common proerties as mentioned in the example.

For multiple form-fields:

  1. copy the same structure
  2. modify as described
  3. append to the collection

formjson item properties are as follows:

  • key value should be one of the following ->

    • textinput for single line text
    • numberinput for numeric type
    • textarea for multi-line
    • checkboxes
    • radiobuttons
    • dropdown
    • datepicker for date type
    • hyperlink to show one redirectable hyper-link (not input)
    • label to show some one line text (not-input)
    • paragraph to show multi line text (not-input)
  • label is the display text/label

  • required boolean value true/false for the field to be set as mandatory

  • maxlength is to be set as integer to limit maximum input value

  • options property should be set for properties checkbox, radiobutton, dropdown.

    This should be an collection of optional values as JSON and the structure shpuld be as defined.

    For multiple options, append same structures in the option collection

    • text => This should be the display value of the option and the value should be space separated and should not contain any special character to avoid errors
eventid integer REQUIRED
formname string REQUIRED
ismandatory boolean
formjson object[] REQUIRED
key string REQUIRED
label string
required boolean REQUIRED
maxlength integer REQUIRED
hyperlink string
options object[] REQUIRED
text string REQUIRED
Responses
default

Error Response

Schema
code int32

Error code.

message string

String description of the error.