Form creation flow APIs:

API Description Request Parameter Response Output
initFormAsync Initializes and returns an empty form object based on the default form file present in the package Form Object
submitFormRequest Submits the newly created form as a request. This results a new conversation card
  • Form
  • Boolean – should inflate/not
submitFormRequestWithoutDismiss Submits the newly created form as a request. This results a new conversation card
  • Form
  • Boolean – should inflate/not
updateForm Used for making changes in form fields like title, description and settings
  • Fields that require updation
  • Boolean – should inflate/not

Initialize a Form

/**
  * Initializes and returns an empty form object based on the default form file present in the package
  * @param {Callback} callback with below parameters:
  * * * * @param {KASForm} form can be null in case of error
  * * * * @param {string} error message in case of error, null otherwise
  */
  function initFormAsync(callback: function(form: KASForm, error: string))

Submit the newly created Form

/**
  * Submits the newly created form as a request. This results a new conversation card
  * @param {KASForm} form
  */
  function submitFormRequest(form: KASForm)
  /**
  * Submits the newly created form as a request. This results a new conversation card
  * @param {KASForm} form
  */
  function submitFormRequestWithoutDismiss(form: KASForm, shouldInflate: boolean)

Update Form


  /**
  * use for making changes in form fields like title, description and settings.
  */
  function updateForm(fields: string, shouldInflate: boolean,callback: (success: boolean) => void)