FormTemplateService

FormTemplateService

Load/Save template service module that contains utility methods to save and delete templates.

Constructor

new FormTemplateService()

Methods

deleteTemplate(data)

Service call to delete the selected template

Parameters:
Name Type Description
data string

id of the template.

getApi() → {Object}

Returns API methods for this class

Returns:
  • object of api functions
Type
Object

getTemplates() → {Array}

Service call to get the list of saved templates

Returns:
  • Array of saved templates.
Type
Array

loadTemplate(data) → {Object}

Service call to get the selected saved template

Parameters:
Name Type Description
data string

id of the template.

Returns:
  • template data.
Type
Object

saveTemplate(data) → {String}

Service call to save the form data to template

Parameters:
Name Type Description
data Object

key and value pairs (id vs data).

Returns:
  • true-saved successfully, false-template already exist.
Type
String