Form Manager API

LiveCycle ES4 saw the (re)introduction of Form Manager. In simple terms Form Manager simplifies the process of managing forms. The official documentation for Form Manager can be found here
Once you have your required forms in Form Manager, you can start to build and manage Forms Portal. There are 2 ways to build forms portal.

  • Using Form Manager API
  • Using Forms Portal Components in CQ
  • FormPortalSample Portal

    In this post we will discuss the first option(using the Form manager api. In your web application you will need to make a ajax call as shown in the code snippet below.

    var nameOfForm = “*”+$(“#formstosearch”).val();

    statements: JSON.stringify([{“name”:”title”,”value”:nameOfForm,”operator”:”CONTAINS”},{“name”:”status”,”value”:”true”,”operator”:”EQ”}])

    Lets take a look at the code above
    #searchForms is the id of a button in the html page. When clicked the above code gets executed.nameOfForm is a variable which holds the value the user typed in the search box.
    Next is the ajax call which is being made to fetch the forms whose title starts with the value entered in the “#formsToSearch” field and forms whose status is “true”(meaning active)
    The ajax call has the following parameters
    appPath – This is application from which you want to search forms from. in our case we are searching for all forms in the repository
    cutPoints: These are the attributes of the form that are returned in the search results
    relation:Indicates what related objects to fetch. No_RELATION means no related objects to fetch
    statement: can have multiple statements. each statement will have name,value,operator. In our case the first statement is looking for forms whose title contains the value of the variable. The second statement is searching for forms whose status equals true(meaning active)

    Once the query is executed, the success handler function can access the results which are stored in the variable.
    You can then loop through the data elements and access title,description and other attributes using the data[i].title or data[i].description syntax

    This entry was posted in Adobe LiveCycle ES4 and tagged , , . Bookmark the permalink.

    Comments are closed.