Home › Forums › Classic DFFS › People Fields Read Only Issue
- This topic has 13 replies, 2 voices, and was last updated 4 years, 8 months ago by Alexander Bautz.
-
AuthorPosts
-
-
April 9, 2020 at 00:38 #29400
In your latest version (4/7) it appears as if you have a rule on form load that makes a people picker field read only it gets hidden instead. Can you please confirm?
-
April 9, 2020 at 08:31 #29402
Does it remove the entire line (label and field value), or is it just missing the person name?
People pickers are a bit tricky on form load because they are not always fully rendered when the form loads and sometimes the function used to set it readonly sees it as empty when it runs.
I’ll see if I can fix this is the next release, but in the meantime you should be able to fix it by using a 500ms delay in the Defer loading of DFFS setting in the Misc tab.
Alexander
-
April 23, 2020 at 19:33 #29599
Alex,
To avoid loosing People Picker fields I removed all people picker fields from all of my tabs and where I need to show them I use table rows with {peoplePicker} to display the name. Intermittently the values are still being cleared. I suspect a timing issue. I was under the impression that if I didn’t include the actual field on any of the tabs it would resolve my issue but it hasn’t. Any ideas how I can eliminate losing my values? Version: 4.4.30
-
April 23, 2020 at 20:16 #29603
I’ve finally identified the root cause. There are number fields with min/max values in the list settings. If a user loads the form the people picker values are there initially. If they enter a value out of range and try to save SharePoint stops the save and returns the user back to the form to fix the min/max out of range values. At that point the people picker values have been wiped out. So if they fix their out of range values and save we lose the people picker values. Until you are able to identify an issue with DFFS re-loading when list field validations fail and can come up with a fix I’ll remove the list field level validations in the list settings and add them to custom JS.
-
April 23, 2020 at 20:24 #29607
I’m glad you found out what was causing it – I didn’t realize it was this validation error. Unfortunately I cannot detect and process the kind of validation set up in list settings for a field from DFFS – but as you mentioned the validation can be checked from within DFFS instead using custom js or the “Validate with custom function” that you can set as operator in a rule.
Alexander
-
April 23, 2020 at 21:58 #29609
This seems like something you will want to take a look at. I will add a custom function to take care of it but the main issue is that when a list field validation fails and the form is reloaded to correct it DFFS loses all people picker field values. I’m sure others have experienced this as well. Definitely not ideal.
-
April 24, 2020 at 10:39 #29619
I absolutely agree – I just haven’t heard of any other users experiencing this same problem. Is this a general problem with all field validations set up in the list settings, or only one specific?
Also, are you sure you don’t have any on-load-rules that will actually clear your people pickers when the form reloads when the server rejects the save because of validation errors?
In any case I’ll look into it and see if I can recreate it and if possible prevent it from happening.
Alexander
-
April 24, 2020 at 15:10 #29626
I verified I don’t have any rules or custom JS that make ANY changes to the people picker fields. I also don’t have those fields in any of the tabs within the forms. Only the {peoplePickerField} in tab row objects. The scenario I had was I had a number field showing as percent that had min and max values in the list settings/field settings. When a user input something out of range and tried to save the form would reload to tell them they had to update the fields to be in range to save. When the form reloaded to tell them that all of the people picker fields were cleared so when they fixed their validation and saved the people picker values were empty. I confirmed that the values were still there after the first save attempt and form reload but empty after the fixed values and subsequent save. Hope that helps. To work around the issue I used custom js to set the attributes of the fields that needed min/max to be number with min and max attributes then added a custom function for on change of the fields to set the value to the min if less than min and to the max value if greater than the max.
-
April 24, 2020 at 17:14 #29630
Thanks for the clarification – I’ll look into it and see if I can figure out what is going on.
Alexander
-
April 26, 2020 at 08:08 #29644
Hi,
I’m not able to recreate this behavior in my Office 365 test site. The field validation returns the user to the form with the provided error message, but all people pickers still have their value – and then persist after saving the form again after the field failing validation has been corrected.Are you able to test this when DFFS is NOT active in the form to ensure it is not a bug in your standard SharePoint form?
PS: You can uninstall DFFS without loosing the config – it will pop back when you reinstall DFFS to this form.
Alexander
-
April 27, 2020 at 01:22 #29646
You were right. It happens even when DFFS is not installed. Very strange. I’ve never seen this behavior before. I tried in UAT where Minimal Download Strategy was deactivated and on Production where it was Active. Both had the same behavior.
-
April 27, 2020 at 17:27 #29653
I’m afraid I don’t know what could be causing this issue – I haven’t heard about it before and cannot find any information on Google.
Is this a SP 2013 site? – and do you get similar results if you create a new list and set up the same validation there? – I’m thinking it might be a bug related to the upgrade from 2010 to 2013 (if that was done to this site).
Alexander
-
April 23, 2020 at 20:19 #29605
I have made one change for the people in the upcoming version that might fix it, but only when using double curly braces like this (this is used to pick up changed values when for example using setFieldValue):
{{name_of_people_picker}}
This might not do any difference until I release the next version, but if you combine this with a delay on loading set in the Misc tab it should work.
PS: You don’t actually loose the value in the PP, it is just not shown in the readonly “display” of the value – the original PP is still there, but hidden in the form. It will be saved with the value it had when loading, or the value you apply to it by using setFieldValue.
-
-
April 9, 2020 at 12:38 #29405
The label is still there. Thank you for reminding me about the delay. I totally forgot about that.
-
-
AuthorPosts
- You must be logged in to reply to this topic.