Versions Compared

Key

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

...

You have the choice of two different approaches:

  1. Method 1Add JavaScript to the Create a file with your JavaScript . Name it custom.js. The custom.js file can be uploaded to an application or on the tenant level.
    1. If a designer uploads the custom.js file
    then upload it into your application.
  2. Method 2 -  Add a Message Control that contains your JavaScript.

Method 1

...

    1. to an application, it is only available for forms/flows in that application
    2. If the tenant admin uploads custom.js to the tenant, then the custom.js will be available to all forms/flows in the tenants
  1. Method 2 -  Add a Message Control that contains your JavaScript.

Method 1a - Upload custom JavaScript to an Application

Upload your custom JavaScript to  via the Scripts tab on the left menu inside your application.

Follow these steps:

  1. Your custom JavaScript must contain the comment // frevvo custom JavaScript as the first line of the file or the upload will not be successful. Note the CustomEventHandlers Javascript object. Application level custom js requires that you create a JavaScript object called CustomEventHandlers.

    Here is an example of code that will add dashes to a Social Security number control as the user is typing it in. See Custom JavaScript Examples for information on this sample code. Notice the JavaScript comment is the first line in the script file.

    Image Added

  2. Login to  as a designer user. Click the Image AddedEdit icon for the application where you want to use the JavaScript. Click on the Script tab located on the left menu.

    Image Added

  3. Browse your hard drive for you script file, Click Upload. Your file will be uploaded and it will display with the name Custom Script even though your script file may have another name. Be Aware that existing JavaScript files will be overwritten.

  4. If you need to modify the script, you must download it, make your modifications and then upload it again. When you download the script by clicking on the  Image Added Download icon, it will be named custom.js.  

  5. Once you have uploaded the JavaScript, it is available for all forms/flows in the application. Remember to add the CSS class name to your form controls or your JavaScript may not work.

    Here is an image of an Employee Information form using uploaded JavaScript to enter dashes in the Social Security Number field while the user is entering the data.

    Image Added

    Method 1b - Upload custom JavaScript to a Tenant

    The tenant admin can upload custom JavaScript to the tenant. Custom JavaScript uploaded on the tenant level is available to all designer users in the tenant. Let's say you are the tenant admin and you have written custom JavaScript to include custom fonts in Message controls or format SSN fields that you want to make available to all designers in your tenant . Upload your custom JavaScript to your tenant via the Scripts link on the Manage page.

     

    Follow these steps:

     

    1. Your custom JavaScript must contain the comment // frevvo custom JavaScript as the first line of the file or the upload will not be successful. Note the CustomEventHandlers Javascript object. Application level custom js requires that you create a JavaScript object called CustomEventHandlers.

      Here is an example of code that will add dashes to a Social Security number control as the user is typing it in. See Custom JavaScript Examples for information on this sample code. Notice the JavaScript comment is the first line in the script file.

      Image Modified

    2. Login to  as a designer user. Click the Image ModifiedEdit icon for the application where you want to use the JavaScript. Click on the Script tab located on the left menu.

      Image Modified

    3. Browse your hard drive for you script file, Click Upload. Your file will be uploaded and it will display with the name Custom Script even though your script file may have another name. Be Aware that existing JavaScript files will be overwritten.

    ..
    1. If you need to modify the script, you must download it, make your modifications and then upload it again. When you download the script by clicking on the  Image Modified Download icon, it will be named custom.js.  

    2. Once you have uploaded the JavaScript, it is available for all forms/flows in the application. Remember to add the CSS class name to your form controls or your JavaScript may not work.

      Here is an image of an Employee Information form using

    an
    1. uploaded JavaScript to enter dashes in the Social Security Number field while the user is entering the data.

      Image Modified


    Tip

    If your JavaScript does not behave as expected after upgrading your version of , it may be caused by a scrubbing of the custom.js file content by XSS protection. You may notice that all your code is on a single commented out line upon Inspection of the custom.js file, Upload an "unsrubbed" version of your custom.js file to solve the issue.

...