Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

Add a custom field to the form

Scroll Prev Next More

 

To add a custom field to the form, follow the instructions below.

 

 

1. Proceed to the Editor page, switch to the HTML mode and add a custom input field to your form. Make sure you specify the field ID.

 

<INPUT id=test type=text>

 

2. Add the following code to the JavaScript OnLoad event of the page where the custom field was added:

 

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){
  var val = $("#test").val();
  formObj.baseParams['test'] = val;
});

 

3. In any event like Before record added or Before process use postvalue("test") to access the custom field value.

See also:

ctrl.on

Control object

JavaScript API

About Editor

Event editor