Expand my Community achievements bar.

Programmatically setting mandatory fields.

Avatar

Level 2

Hi,

How do i programmatically set a field to be mandatory. The field has to be set to mandatory, and the form should refuse submission of data; based on the value of another field..

Thanks,

Prashant.

3 Replies

Avatar

Level 6

Hi,

To set field mandatory use this script:

fieldName.validate.nullTest="error"

to set field optional:

fieldName.validate.nullTest=""

BR,

Paul Butenko

Avatar

Level 2

Thanks a lot, Paul.

Regards,

Prashant.

Avatar

Level 1

Hi Paul,

Just wondering, where exaclty in the coding it would go?  I'm stumbling my way around and have no idea.

Cheers

BK