MaxDB PHP Generator online Help
Prev | Return to chapter overview | Next |
setRequired
Sets or clears the required attribute for a control.
Signature:
function setRequired([true|false])
Example:
if (sender.getFieldName() === 'payment_method') {
var isCreditCard = editors.payment_method.getValue() === 'Credit Card';
editors.credit_card.setVisible(isCreditCard).setRequired(isCreditCard);
}
The example can be seen live in our Feature Demo.
See also: getRequired
Prev | Return to chapter overview | Next |