Choice Field

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

03 Jul 2014

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

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

07 Jul 2014

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;
});

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests