JavaScript CookBook/Workflow Form/Manipulating forms immediately after loading

From GeoMedia Smart Client
Jump to: navigation, search
GMSC 2013/2014 Javascript API Overview Form Events Types Utility Functions client-side Validation Conditions Interaction with SmartClient Cookbook Cheatsheet


Manipulating forms immediately after loading

Problem: You want to manipulate a form immediately after loading, without any user interaction (e.g. button click).

Solution: Bind your script to the form:ready event and will be automatically executed after the loading of the form has completed.

This example hides the form item FORM_FIELD right after loading the form:

IG.vent.on('form:ready', function(form){
    form.getItemById('FORM_FIELD').hide();
});

Other Recipes in this category: