Page 1 of 1
focus people picker field
Posted: 30 Mar 2015
by coresoul
how to i focus to people picker field on submit if that field is mandatory and left blank?
Re: focus people picker field
Posted: 30 Mar 2015
by Dmitry Kozlov
Please, set Render property of the field in Client in the Forms Designer. Next, you can use the following code to set focus to the field:
Code: Select all
fd.field('FieldName').control()._el().find('.sp-peoplepicker-editorInput').focus()
Re: focus people picker field
Posted: 30 Mar 2015
by coresoul
else if (fd.field('Project_x0020_Manager').value().dictionaryEntries.length == 0) {
alert('Please, fill in the Project Manager field.');
$('#fd_tabcontrol-0').tabs('option', 'active', 0);
fd.field('Project_x0020_Manager').control()._el().find('.sp-peoplepicker-editorInput').focus();
return false;
}
Am i doing something wrong?
Re: focus people picker field
Posted: 31 Mar 2015
by Dmitry Kozlov
Hi,
If you use People Picker field in the client-side rendering mode, please, check whether it is empty with the following code:
Code: Select all
fd.field('User').value().length == 0
http://spform.com/forms-designer- ... eld-values