Save form instance

This API call is made when a user has completed editing or create a new form and wants to save that form on the LiveContent server. The API call can accept an instance ID, which indicates that the form has been edited, or be called without one, which indicates a new form instance has been created. The client is responsible for forming and sending an XML post that contains all of the form data.

Example API call

/servlets3/wietmsd?id=1459765901242&book=s1000d_bike_41&collection=default&uniqid=1459765899838&target=forms&action=save_form&form_type=genforms&form_name=SavedSearches&instance_title=NewSearch

Parameters

ParameterDescription
targetforms
actionsave_form
form_typeThis value is always genforms.
form_nameThe system identifier of the form type, such as SavedSearches, genform1, or template.
instance_titleThe instance title, such as NewSearch.
uniqidTo prevent browser-side caching of data, especially with AJAX requests, it is important to make a URL unique. The most effective technique to accomplish this is to include a time parameter that is based on the time at which the call is made.
idA session ID that is valid for this collection and publication combination.
book The name of the publication, such as s1000d_bike_41.
collectionThe name of the collection that the publication is registered in, such as default.

XML post data

This API call requires XML post data to complete. An example of that XML data is given here. The XML post data is wrapped in a <form-data/> element and contains a single <cond/> element for each piece of data the user wants to save for the form. Each <cond/> can have multiple children, if there are multiple values associated with a single form field or entry.

<form-data>
     <cond id='scope' label='Scope'>
          <item>full_text</item>
     </cond>
     <cond id='ignoreCase' label='Ignore Case'>
          <item>true</item>
     </cond>
     <cond id='wholeWords' label='Whole Words'>
          <item>false</item>
     </cond><cond id='term1' label='Term 1'>
          <item>bike</item>
     </cond><cond id='term2' label='Term 2'>
          <item></item>
     </cond>
     <cond id='op' label='Search Operator'>
          <item></item>
     </cond>
     <cond id='andCategories' label='And Categories'>
          <item></item>
     </cond>
     <cond id='branchLimit' label='Branch Search'>
          <item>1</item>
     </cond>
     <cond id='catBranchLimit' label='Categorical Branch Search'>
          <item>0</item>
     </cond>
     <cond id='tocParentId' label='TOC Branch ID'>
          <item>166</item>
     </cond>
     <cond id='advancedSearch' label='Advanced Search'>
          <item>0</item>
     </cond>
</form-data>

Returns

On success
<RESULT>
     <STATUS>OK</STATUS>
	    <FORMID>savedsearches-1459765901242-1459766929386</FORMID>
</RESULT>
On failure
Returns nothing