Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The FAQs provide some examples and code snippets for common tasks when a third-party application wants to interact with the server.

...

Code Block
    FormsService fs = ...;
    URL schemaFeedUrl = fs.getFeedURL(SchemaFeed.class);
    SchemaFeed schemaFeed = fs.getFeed(schemaFeedUrl, SchemaFeed.class);
    for(SchemaEntry schemaEntry: schemaFeed.getEntries()){
        System.out.println("Schema Name: " + schemaEntry.getTitle().getPlainText());
    }

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

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

Code Block
    ApplicationEntry appEntry = ...;
    SchemaFeed themeFeed = appEntry.getSchemaFeed();
    for(SchemaEntry schemaEntry: schemaFeed.getEntries()){
        System.out.println("Schema Name: " + schemaEntry.getTitle().getPlainText());
    }

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 URL as shown in the snipped below:

...

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 form url URL as shown in the snipped below:

...

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 URL as shown in the snipped below:

...

      3. Upload the users csv file:  

Code Block
curl http://host:port/frevvo/web/tn/tenant.id/allUsers  -F notificationEmailAddress=some_email_address -F usersFile=@users_file.csv  -X POST  -b cookies -H Content-Type:multipart/form-data

...

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:

Code Block
Validation occurred with errors. Users data NOT loaded. Refer to attached CSV data file for validation and/or loading result details.

...