I populate Fields in my form from other Sharepoint lists like cost centre. Of course I do not want the user to edit them as they are fetched from somewhere else automaticlly. That's why I set those field to disabled. But as soon as the user saves his form he Item gets saved in the Sharepoint list but the values I automaticlly filled are all gone and are empty. Is there a better way to achive what I am trying to do? Am I doing something wrong here?
Solved! Go to Solution.
Well I fetch a bunch of fields at the start.
It works like this:
- I field is defaulted with the creator of the item from there I fetch his e-mail
- This email is a key value in another SP list. Where I then fetch all the fields and set the values like "lokation.val(oListItem.get_item('Lokation'));" where oListItem is the JSOM Object with the listitem which has the e-mail as key.
I hope that helps.
Thanks for your help!
Yes it is still the same. Also my main problem is that the values that get fetched are lost after I press save. This ONLY happens to the disabled fields. there are also fields fetched which can be altered but those stay after the safe. So if I create a new item enter stuff in the form then press safe and look at the list in SP all the disabled fields are just empty.
Here is the solution