Page 1 of 1

Make people picker field read only after saving

Posted: 23 Sep 2016
by TWendt
Hi all,

is it possible to make the people picker field read only after saving?

Best regards

Tom

Re: Make people picker field read only after saving

Posted: 26 Sep 2016
by Dmitry Kozlov
Hi,

Do you mean that you need to make it read-only in the edit form? If so, just set ReadOnly property in True in Forms Designer.

Re: Make people picker field read only after saving

Posted: 26 Sep 2016
by TWendt
Hi,

no. The decision makers opens the form in edit mode. Then they select the name in the people picker field for approval and save the form. When the form is open again, the people picker field should be read only.

Best wishes

Tom

Re: Make people picker field read only after saving

Posted: 26 Sep 2016
by Dmitry Kozlov
Then disable the field with JavaScript if it has a value:

Code: Select all

fd.field('User').control('ready', function() {
	if (fd.field('User').value().length > 0) {
	    fd.field('User').readonly(true);
	}
});
Where 'User' is the internal name of your people picker field.

Re: Make people picker field read only after saving

Posted: 27 Sep 2016
by TWendt
Hi Dimitry,

thanks for your assistance, it works great.

Best regards

Tom