Live Forms Latest - This documentation is for Live Forms 7.4 Not for you? Earlier documentation is available too.

Skip to end of metadata
Go to start of metadata

On this page:

How do I login/logout to/from a Form server?

The direct method for an existing user: See the C# code snipped below:

Note that when you login, the .NET client API initializes a local security token based on your credentials.  It does not actually make a call however, until you make your first request.  At that time, the forms service will attempt to authorize you based on your token.  In the above example, the first call is for the user entry.

The LoginAs method for an existing user:

This new method allows you to login as any of the existing tenant users provided you can pass in the tenant's admin user and password. This is quite convenient when you want login using the same user that is logged into your application without having to know their password.

The LoginAs method for a new/undefined user:

When your tenant is configured with the Delegating Security Manager, you can use the loginAs() method to automatically create new/virtual users.

When you login, the .NET client API initializes a local security token based on the supplied credentials.  It does not actually make a call however, until the first request is executed.  At that time, the forms service will attempt to authorize the user based on the provided token.  In the above examples, the first call is for the user entry.


How do I get the list of all applications for the current user?

How do I get the list of all themes for the current user?

All references to Themes have been removed in version 5.3. This example does not pertain to Live Forms 5.3 or later.

How do I get the list of all forms for the current user?

 

How do I get the list of all forms for a given application?

The code snippet below prints the name of all forms in the appEntry application:

How do I get the list of all schemas for the current user?

How do I get the list of all schemas for a given application?

The code snippet below prints the name of all schemas in the appEntry application:

How do I create an Application?

How do I find an existing Application?

At this point you have to manually filter the entries in an ApplicationFeed. See the following snippet:

How do I delete an Application?


How do I upload an Application for a specific user?

First get a hold of the corresponding UserEntry for the desired user, and then use the users ApplicationFeed.

How do I upload an Application?

 

How do I rename an application?

The method ApplicationEntry.Update() is only available in .Net Client API version 5.1 Patch 3 and later.

How do I download an Application?

  

After I found a ApplicationEntry for the first time can I get the entry directly?

If you have an entry id you can retrieve the entry directly.

How do I get the url to a form so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the form url as shown in the snipped below:

Then using the url in formTypeUrl above you can generate the following script tag in your html page:

This will embed the form in your page inside an <iframe/>.

How do I get the url to the form designer so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the formType url as shown in the snipped below:

Then using the designerUr' above you can generate the following script tag in your html page:

This will embed the form designer in your page inside an <iframe/>. 

 

How do I get the url to the form submissions so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the form url as shown in the snipped below:

Then using the formSubmissionsUrl above you can generate the following script tag in your html page:

This will embed the submissions view in your page inside an <iframe/>.

How do I get the url to the form instance so it can be embedded in my HTML pages?

First get a hold of the corresponding FormTypeEntry, then get the form instance url as shown in the snippet below:

Then using the formInstanceUrl above you can generate the following iframe tag in your html page:

This will embed the form instance in your page inside an <iframe/>. 

How do I get the url to return the form instance embed java script?

First get a hold of the corresponding FormTypeEntry and then get the url as shown in the snippet below:

Then using the formInstanceUrl above you can generate the following script tag in your html page:

This will embed the form instance in your page inside an <iframe/>. 

  • The method FormTypeEntry.CreateFormInstanceEmbed(NameValueCollection, params MediaSource[]) is only available in .Net Client API version 5.1 Patch 3 and later.
  • See this documentation for more information about available URL parameters.

How do I get a form entry based on a known id? 

This is often needed when you need to relate a Live Forms form with another concept your application (e.g. you application has the concept of a report that has an associated Live Forms form). In this case you will store the form id somewhere and when needed fetch the form entry to embed it in your page, delete it, etc.
Here is how you get the for a form entry (in fact any entry):

Here you can associate the formtype id with your application objects and retrieve the corresponding entry at any time as follows:

How do I delete a form (or any other entry)?

By calling the delete method on the FormTypeEnty.

How do I create a new form?

First you have to get a hold of the form feed from an existing application. See How do I get the list of all forms for a given application?.

When inserting the original formtype variable will not' be updated and the updated entry will be returned by the Insert method.

How do I create a new form using an existing one as a template?

The only difference between creating a new form and creating a new one based on an existing form is that instead of using the entry created by calling 'ftFeed.createEntry()' you will be using an existing form entry. Find an existing form entry, update its name and description and use that entry to insert into a feed. Do not override the entry id otherwise the insert will fail.

How do I create a form instance?

 Use the code below to create a form instance: 

How do I create a form instance in edit mode?

The method FormTypeEntry.CreateEditingFormEntry is only available in .Net Client API version 5.1 Patch 3 and later.

How do I save edits to a form instance that was created in edit mode?

The method FormEntry.SubmitEdit is only available in .Net Client API version 5.1 Patch 3 and later.

How do I cancel edits to a form instance that was created in edit mode?

The method FormEntry.SubmitEdit is only available in .Net Client API version 5.1 Patch 3 and later.

How do I create a form such that the document set is returned when the form is submitted?

First get a hold of the corresponding FormTypeEntry and then specify the _formActionDocs parameter as true when creating the FormEntry.

The _formActionDocs parameter is only supported by .Net Client API version 5.1 Patch 3 and later.

 How do I receive the document set (including attachments) for the Form when submitted?  

  • The method FormEntry.SubmitInstance() will return null if the FormEntry was not created with the _formActionDocs parameter set to true.
  • The method FormEntry.SubmitInstance() is only available in .Net Client API version 5.1 Patch 3 and later.

How do I pre-populate values when creating an Instance? 

When creating a form instance, you can supply data to pre-populate fields.  There are a couple of ways to do this.  The first way is to supply a name value collection, which holds control names and values.  The second way is to supply an XML document, with control names and values. Suppose your form has two text fields, named A and B respectively.  Also, suppose you wish to prefill these 2 controls with values, as shown:

Example 1 – using a name value collection

 This example uses a special parameter named _data.  The value carries a formatted string containing the form values, as shown below.

Example 2 – using an XML document

This example uses an XML document.  The document structure contains the form values which are to be applied, as shown below.

Example 3 – using link parameters and an XML document

  • The method FormTypeEntry.CreateFormEntry(NameValueCollection, Stream) is only available in .Net Client API version 5.1 Patch 3 or later.
  • See this documentation for more information about available URL parameters.

Example 4 – using link parameters and multiple files

  • The method FormTypeEntry.CreateFormEntry(NameValueCollection, params MediaSource[]) is only available in .Net Client API version 5.1 Patch 3 or later.
  • See this documentation for more information about available URL parameters.

How do I edit a form control?

Suppose you have a form with controls named A and B.  Further, suppose the form is initially empty, and you wish to programmatically set the control values to TestA and TestB respectively.  First you have to get a hold of the form instance (see 'How do I create a form instance?).

Objects, of any kind, that are part of a Flow cannot access the list of controls for the Flow.  Attempted access of FormTypeEntry.ControlTypeFeed, FormTypeEntry.ControlTypeFeedLink, FormEntry. ControlFeed, or FormEntry.ControlFeedLink will result in a NotSupportedException.

How do I submit a form?

First you have to get a hold of the form instance (see 'How do I create a form instance?). When you are finished editing your form, you may submit it as follows:

How can I print a submission as PDF (if no snapshot was saved)?

First you have to get a hold of the form instance (see 'How do I create a form instance?).

Printing objects of any kind that are part of a Flow is not supported and will result in a NotSupportedException.  

How can I save a form for working on later?

First you have to get a hold of the form instance (see 'How do I create a form instance?).

How can I resume working on a form I saved earlier?

Suppose you saved a form as in the above example.  Now, suppose you want to resume working on the form.  When you save a form, it becomes available for retrieval via the task feed.

How do I upload an XSD Schema?

You can upload XSD schemas using the following code. Note that if the xsd being uploaded consists of multiple files you must upload the dependencies one by one making sure you start with the one without any dependencies, i.e. only upload schemas when all its dependencies are already uploaded.

How do I query the DocumentType's for a SchemaEntry?

You can list all the DocumentType's contained in a SchemaEntry by using the following code. Why would you want to do that? You use Schema DocumentType's to add to FormType's so controls can be auto-generated from it.

How do I add a Schema DocumentType to a FormType?

Let's say I have a purchase order xsd and would like to auto generate a form for it. Let's say that I already uploaded the xsd and have a SchemaEntry at hand.

Now you have a new form named My Purchase Order Form and you have the purchase order element added to the Data Source pane in the Designer. Using the designer, expand the Data Source pane and click the plus button to auto-generate the form controls (note that the API will be expanded to support auto generating controls).

I added a DocumentType from a Schema to my FormType. Why do I see two DocumentTypes?

Every FormType always has 1 default DocumentType that cannot be removed. This is the DocumentType managed by Live Forms and updated when controls from the palette are added or removed from the form. For this DocumentType the Delete() method will fail (you can check whether a DocumentType can be deleted or not using the entry's ReadOnly property).

How do I delete a FormType DocumentType that was added from Schema?

The following code will remove all FormType DocumentTypes that were added from Schema:

How do I set a form's Deployment State?

How do I copy a form?

Copying entails inserting an existing entry into a feed. The key difference between this case and a regular feed insert() is that the entry being inserted already has an id: this will trigger a copy.

Functions only available in .net client API version 5.2 or later

The updates listed here are only available in .net client API version 5.2 or later.

How do I upload an Application for a specific user?

There are three options when uploading an application for a user: Insert, Copy or Replace: 

How do I update the ElementName for a Form or Flow?

Update the ElementName property: 

How do I upload a form/flow?

There are three options when uploading a Flow or Form: Insert, Copy or Replace:

How do I receive the Submission Document Set from a form submission?

When the _formActionDocs parameter is set, the SubmitInstance call will return a list of MultiPartContentElement objects that contain the submission documents. 

 

Functions only available in the .net api for Live Forms v5.3 or later:

The updates listed here are only available in .net client API version 5.3 or later.

 Note the Themes api was removed and replaced by the Styles api in frevvo 5.3.  All references to Themes have been removed in frevvo 5.3.

How do I Upload a custom script?

How do I Delete a custom script?

How do I Download a custom script?

How do I Upload a Style?

How do I Delete a Style?

How do I get the list of Styles for the current user?

There are two ways to get the list of Styles for a current user.  You can use the UserEntry.StyleFeed:

Or you can Query via the FormsService class:

How do I set the Style property for a Form or Flow?

How do I upload a form/flow?

There are three options when uploading a Flow or Form: Insert, Copy or Replace. You can use a Stream or a file path location when uploading.

How do I use FormEntryBuilder convenience class to reinstantiate forms with signatures for submission?

Functions only available in the .net api for Live Forms v6.1.2 or later:

The updates listed here are only available in .net client API version 6.1.2 or later.

Ability to create a new form instance using an alternate service/user:

Addition of required fileName parameter to stream-based FormEntryBuilder methods:

The filename attribute for stream-based methods for digital/wet signatures and documents is required. Methods without the filename parameter are deprecated.

Add a Document to the builder from a given stream

This method deprecates the previous method:

public FormEntryBuilder Document(string partName, Stream inputStream, string contentType)

Add a wet signature image to this builder from a given stream

This method deprecates the previous method:

public FormEntryBuilder WetSignature(string id, Stream inputStream, string contentType)

Add a Digital signature to this builder from a given stream

This method deprecates the previous method:

public FormEntryBuilder DigitalSignature(Stream inputStream, string contentType)

Get the Raw Link to the form/flow from the FormTypeEntry:

Add convenience method to upload schema file(s) in zip form:

Added convenience method to upload Schema file(s) in .xsd file form:

Added convenience method to upload Schema file(s) in MediaSource form:

Functions only available in the .net api for Live Forms v6.1.5 or later:

The updates listed here are only available in .net client API version 6.1.5 or later.

How do I batch upload users from the api?

The format of the users csv file is the same as that used through the UI users load feature.

Users csv upload through HTTP.  

The users csv upload is available directly through HTTP. One way to do this is using cURL, but other ways are possible. Here are the steps:

  1. Log in:

      2. Replace host, port, username and password above as correct for your implementation. For Live forms online, host=app.frevvo.com and the port is optional. Change http to https.

      3. Upload the users csv file:

      4. Replace host, port, tenant.id, some_email_address and users_file.csv above as correct for your implementation. If users_file.csv is not in the current directory, adjust the path accordingly. For Live forms online, host=app.frevvo.com and port is optional. Change http to https.

      5. Check the some_email_address for incoming email with the results of the load.

      6. (Optional) Get the user csv back from frevvo. It will have all users, including all that were loaded:

      7. The response will be the users csv data.

Users csv upload through the .net client api 

The users csv upload is available through the .net client api in Live Forms v6.1.5. Here is the code snippet:

 

To get the users csv data from frevvo:

 You can specify who receives an email reporting the upload status when it is done through the API. The email is sent to the "notificationEmailAddress" that is passed in the API. The email may say something like this if there are errors during the upload:

The attached file, results.csv, will contain the details.


  • No labels