Back to Table of Contents

Javascript in Web Forms

Javascript Tab

The Web Form does not, as of 1.16.3, automatically handle calculations or complex skip logic. However, it is possible to add this functionality by using the Javascript tab.

It is beyond the scope of this book to give a tutorial on Javascript or traversing a DOM, please see other internet references such as for this.

Add HTML Ids for your form elements

The javascript tab, relies on identifying the elements of your form by Id. However, if does not use the bindings to do this, instead these must be set manually in the Design Surface.

  1. Select the Design Surface
  2. Select the element you are interested in
  3. Scroll down to the bottom of the Widget Properties window to find the Field Id

Once all the necessary id's have been set, save your form, edit and save your javascript.

Test in the Preview Tab

  1. Right click in the Preview tab and hit Refresh if necessary

You can then test your javascript including using standard browser debugging tools like Firebug and console.log() if necessary.