Check if People Picker field is empty.
Hello,
I would like to ask how to validate people picker field if it is empty using javascript? I already have a validation for text but cannot seem to replicate it and use in peoplepicker field. Please help. Thanks.
I already read this http://spform.com/forms-designer- ... eld-values but still cant make it work.
Best Regards,
Erica
I would like to ask how to validate people picker field if it is empty using javascript? I already have a validation for text but cannot seem to replicate it and use in peoplepicker field. Please help. Thanks.
I already read this http://spform.com/forms-designer- ... eld-values but still cant make it work.
Best Regards,
Erica
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello Erica,
Here is the sample:
You can find more samples on how to validate fields, make them mandatory or hide them conditionally in the following post:
http://spform.com/office-365/cond ... ynamically
Here is the sample:
Code: Select all
if (fd.field('AssignedTo').value().dictionaryEntries.length == 0) {
// AssignedTo is empty
}
http://spform.com/office-365/cond ... ynamically
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Please, use the code below:
Code: Select all
if (fd.field('InternalName').value().length == 0) {
…
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests