cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Value of disabled fields not saved

Jump to solution

Hi,

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?

Greetings

Labels: (1)
Reply
22 Replies
Workflow Hero

Re: Value of disabled fields not saved

Jump to solution

Hi Janis,

How do you fill your lookup value?

Maybe you need to store the ID of the lookup value as well.

Best regards,

Christophe

0 Kudos
Reply
Not applicable

Re: Value of disabled fields not saved

Jump to solution

They are not lookup controls. They are just single line of text fields. So I only store strings in them. They get filled with custom javascript using the JSOM.

0 Kudos
Reply
Workflow Hero

Re: Value of disabled fields not saved

Jump to solution

OK.

When you read the item, is there any code that updates this text field?

Same question, if you edit the item.

Regards,

Christophe

0 Kudos
Reply
Not applicable

Re: Value of disabled fields not saved

Jump 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!

0 Kudos
Reply
Workflow Hero

Re: Value of disabled fields not saved

Jump to solution

Can you check if the email value is still the one you used when you create the item by displaying in a computed value for example?

0 Kudos
Reply
Not applicable

Re: Value of disabled fields not saved

Jump to solution

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.

Greetings

0 Kudos
Reply
Workflow Hero

Re: Value of disabled fields not saved

Jump to solution

I have found this intersting post and I confirm the same behaviour.

But I do not know how Nintex is handling that

Cheers

0 Kudos
Reply
Workflow Hero

Re: Value of disabled fields not saved

Jump to solution

Here is the solution

Let the field Enabled and add to the Form Settings - Custom Javascript the following line

NWF$('#'+txtDisabled).prop("readonly", true);

where txtDisabled is the Store Client ID in JavaScript variable for your field

Best regards,

Christophe

Reply
Not applicable

Re: Value of disabled fields not saved

Jump to solution

Thank you for your fast help!

Greetings!

0 Kudos
Reply