Versions Compared

Key

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

The notification API allows you to show standardized application level Forms inMotion notifications without breaking out of the sandboxed security model of the iframe in which your custom HTML form will be shown. 

Step-by-step guide

  1. This is called using the same integration as the Query API (Using the Query API) the Forms_inMotion function.  That function will be injected into your form at load time.

    Code Block
    languagejs
    linenumberstrue

    In places where you may typically use javascript "alert()" to show a message to your user, you cannot do so from your custom forms inside Forms inMotion.  This is for 2 reasons:

    1. The popup occurs at the application level and halts execution of that thread which can cause problems in some browser environments
    2. The popup may appear to come from the application when it does not so it might be confusing to the user

    The solution to this is a built in function call that you can use in the same way that the query API is called above.  This is the alert call.

    Alert API


    var parameters = [];
    Forms_inMotion("alert","
    That action is not valid");
    Your alert text goes here","", parameters);


    As you can see it still calls intto the same function as the query so make sure to include the empty string and empty parameters array after your call to the alert function and your message.

Filter by label (Content by label)
showLabelsfalse
max5
spacesFIMKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "api" and type = "page" and space = "FIMKB"
labelsapi

Page Properties
hiddentrue


 
Related issues 
Component