Documentation Center

save_xform_def

Save an xform in the database.

Description

Save an xform definition file in the database.

Parameters

action
save_xform_def
icon
Icons being used in xform. It is defined in xform configuration file.
status
If provided, only XForms with the provided status are returned in the result set. This parameter is not available if the pub, lang, or docid parameters are provided.
edits
Value defined in xform configuration file for allow_edits attribute. If value is '1', it is allowed to edit, if values is '0', edit is not allowed.
reply_status_options
Xform status defined in xform configuration file. Available values are xform.status.accepted, xform.status.rejected, xform.status.completed, xform.status.new.
type
Form type. It can be system, floating or document.
id
ID of the xform in xform configuration file
status_options
Xform status defined in xform configuration file. Available values are xform.status.accepted, xform.status.rejected, xform.status.completed.
replies
Value defined in xform configuration file for allow_replies attribute. If value is '1', it is allowed to reply, if values is '0', reply is not allowed.
xformfile
Xform definition file name, like xform.issue_report.html.
public
This value is defined in xform configuration file. If it's value is true, the xform is public otherwise, it is private.

Example URL

http://<host>:<port>/<context>/web/xforms.xql?action=save_xform_def&icon=<value>&status=<value>&edits=<value>&reply_status_options=<value>&type=<value>&id=<value>&status_options=<value>&replies=<value>&xformfile=<value>&public=<value>

Successful Result

This function returns a standard API result element (<result status='SUCCESS' statusCode='0' message='Localized Message' messageKey='message.key'/>). A statusCode of 0 indicates a successful execution. Any other statusCode indicates a failure.

Failed Result

If user does not have both 'Develop app' permission, it will display pemission denied page. In the case of an error, this function returns a standard API result element with a non-zero statusCode (such as, <result status='FAIL' statusCode='200' message='Localized Failure Message' messageKey='message.key'/>). Refer to API Error Code Reference.