Page 1 of 1

Choice Field

Posted: 03 Jul 2014
by schuess
1. How do you set a choice field to be required?

2. How do you validate that a choice field has been "checked" or "Not(!) checked"?


Thanks

schuess

Re: Choice Field

Posted: 07 Jul 2014
by Dmitry Kozlov
Hi,

Do you mean to make a field to be required dynamically? If so, just add custom validation into onsubmit handler. Here is a sample:

Code: Select all

fd.onsubmit(function() {
	if (fd.field('Choice').value().length == 0) {
		alert('Please, fill in the Choice field.');
		return false;
	}
	return true;
});