Javascript Events

WS Form fires a number of different events during the lifecycle of a form. You can use these to run your own javascript when the event fires. An example of doing this would be:

$(window).on('wsf-rendered-instance-1', function() { alert('Instance ID 1 just finished rendering!'); });

or

$(window).on('wsf-rendered-form-1', function() { alert('Form ID 1 just finished rendering!'); });

A trigger fires for both the instance ID and the form ID. To learn more about instances, click here.

Rendered

This fires when a form has finished rendering.

wsf-rendered-instance-# (Where # is the instance ID)
wsf-rendered-form-# (Where # is the form ID)

Before Validation

This fires prior to the form being validated.

wsf-validate-before-instance-# (Where # is the instance ID)
wsf-validate-before-form-# (Where # is the form ID)

After Validation

This fires prior to the form being validated.

wsf-validate-after-instance-# (Where # is the instance ID)
wsf-validate-after-form-# (Where # is the form ID)

Lock

This fires when the form is locked, just prior to the data being posted on a submit or save.

wsf-lock-instance-# (Where # is the instance ID)
wsf-lock-form-# (Where # is the form ID)

Submit

This fires when the form data is posted to the server on a submit.

wsf-submit-instance-# (Where # is the instance ID)
wsf-submit-form-# (Where # is the form ID)

Save

This fires when the form data is posted to the server on a save.

wsf-save-instance-# (Where # is the instance ID)
wsf-save-form-# (Where # is the form ID)

Actions Start

This fires when the form actions start to run on the client side.

wsf-actions-start-instance-# (Where # is the instance ID)
wsf-actions-start-form-# (Where # is the form ID)

Actions Finish

This fires when the form actions finish on the client side.

wsf-actions-finish-instance-# (Where # is the instance ID)
wsf-actions-finish-form-# (Where # is the form ID)

Unlock

This fires when the form is unlocked.

wsf-unlock-instance-# (Where # is the instance ID)
wsf-unlock-form-# (Where # is the form ID)