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.

    $(“#searchforms”).on(“click”,function()
    {
    var nameOfForm = “*”+$(“#formstosearch”).val();
    $.ajax({
    type:’POST’,
    url:”/lc/libs/formsmanager/manage.json?func=searchForms”,

    data:{
    appPath:””,
    cutPoints:”title|description|author|formUrl|pdfUrl”,
    relation:”NO_RELATION”,
    includeXdp:”false”,
    maxSize:0,
    offset:0,
    orderings:JSON.stringify([]),
    statements: JSON.stringify([{“name”:”title”,”value”:nameOfForm,”operator”:”CONTAINS”},{“name”:”status”,”value”:”true”,”operator”:”EQ”}])
    },
    success:function(data)
    {
    }

    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

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 3.5/10 (6 votes cast)
    Form Manager API, 3.5 out of 10 based on 6 ratings
    This entry was posted in Adobe LiveCycle ES4 and tagged , , . Bookmark the permalink.

    Comments are closed.