Versions Compared

Key

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

...

In this example, when the user enters some text in the field named "1own.M.City" an alert will show up saying "key up!".

REST Example:
Set the CustomJavascript and HTMLBodyOnloadFunction Quik! Forms Engine properties:

 "CustomJavascript": [

      "function customMethod(){ return 'my custom js!'; }",

      "function anotherCustomMethod(){ return 'another custom js!'; }",

      "function customBodyOnLoad(){ alert(customMethod() + ' || ' +  anotherCustomMethod()); }"

  ],

  "HTMLBodyOnloadFunction": "customBodyOnLoad()",

In this example, when the form viewer loads, a pop up message appears:
Image Added

Adding A Javascript File

If you're adding lots of JavaScript functions it may be better to write a .JS file and include it as a referenced file. For example:

...