cancel
Showing results for 
Search instead for 
Did you mean: 
mc68b09e
Nintex Newbie

how to get disabled field value

Jump to solution

I am facing the trobule that the disalbed field on Nintex Forms and I can not get this field's value by Button clicking using Java Script.

Field setting:

     defalut value: 'HOGE'

     Appearance > display:Yes

     Appearance > availabilty:No

above setting in Nintex forms in Japanese, the field value showed as a static text.

I want to get/set its field value using JavaScript:

I tried below JS code on Button's custom script:

obj = NWF$('#'+HOGE);

obj.removeAttr('disabled');

alert(obj.text());

obj.Attr('dsiabled','disabled)'

Then I publied the form and checked the code, alert showed blank.

Does anybody help me?

thanks.

0 Kudos
Reply
5 Replies
Automation Master
Automation Master

Re: how to get disabled field value

Jump to solution

Hi,

Just to make sure about this line obj = NWF$('#'+HOGE)

HOGE must be the Client ID JavaScript variable name and not the Default value

Expand Advanced

Set Store Client ID in JavaScript variable to Yes

Enter a ID for Client ID JavaScript variable and then use this variable in your Javascript

Best regards,

Christophe

0 Kudos
Reply
mc68b09e
Nintex Newbie

Re: how to get disabled field value

Jump to solution

Hi Rucq san

Thank you for your reply and sorry for late response.

I tried them as follow your suggesion, however it didn't work.

Is it possible to get/set the static text value using control on Nintex Forms?

thanks.

0 Kudos
Reply
mapeacock
Nintex Newbie

Re: how to get disabled field value

Jump to solution

Hi Shinsuke,

I believe I had a similar issue. By disabling the visible option on a calculated field (I didn't want to see it - just use the value), I found that the value was not even being populated in subsequent use of the field.

What I did to get it to work was to leave the field as visible, but apply a formatting rule that always hid the control. For example, enter "1==1" in the formating rule formula while also selecting the hide option. Weird - but worked for me!

There must be a different treatment of the control based on applying the formatting rule over disabling the visibility control.

Cheers,

Mark

0 Kudos
Reply
Automation Master
Automation Master

Re: how to get disabled field value

Jump to solution

Hi Mark,

There is a difference between hiding a field from the HTML page and use the hidden property to hide the field from the UI but still accessible in Javascript.

When you apply the setting of the field, you 'remove' the field from the HTML Page.

When you apply a rule, you hide the field from the UI but it is still in the HTML Page.

I have checked both scenarios, open the source of the page and did not find the field in case 1 and find it in case 2.

No sot weird ;-)

Best regards,

Christophe

0 Kudos
Reply
mc68b09e
Nintex Newbie

Re: how to get disabled field value

Jump to solution

HI All

thank you for your reply.

Once I set the control setting > Advanced > Control Mode : Display for 'HOGE' control, it will be showed a statc text as same as label control in New form and the JavaScript code does not access this value.

I guess above setting would be 'automatic' or 'editable' allow field value access by JavaScript.

thanks

0 Kudos
Reply