Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners

DB2 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