controller.afterSetData
Triggered when a control sets a field value. Used for handling user interactions or modifying the layout based on the interactions.
Parameters
Name | Type | Descripton |
---|---|---|
name | {String} | the name of the field |
value | {FIELD_VALUE_OBJECT} | the new value of the field |
Returns
none
Example
Show a special offer for female customers when the gender field and the special offer control are on the script page.
// First: set the correct layout on load
$('page').onLoad = function() {
vcc.getController('page', 'offer_for_women').hidden =
!vcc.isSelected('gender', 'female', 'export_value');
};
// Then: change the layout when the gender changes
$('page', 'gender').afterSetData = function() {
vcc.getController('page', 'offer_for_women').hidden =
!vcc.isSelected('gender', 'female', 'export_value');
};
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.