Nintex for Office 365 Forum
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
Hi,
I have a Nintex Office 365 form. I have written javascript to print the form. There are many textboxes on the form which are not connected to any column of content type. How can I get values of these textboxes in Display mode of the form?
I have written following code which returns 'undefined'
var res = NWF$("#" + txtRes).val();
This works & gives proper value in New & Edit mode of form but not in Display mode.
Solved! Go to Solution.
Hi,
do you try this ?
var res = NWF$("#" + txtRes).text();
As you are in display mode, your field is not represent by an input control but by a div
Regards,
Thanks for reply Jean. I tried what you have said but NWF$("#" + txtRes).text() returns blank string. And it has value which is displayed on form.
When I see page source in developers tool of browser, there is div with value & hidden textbox but the textbox has assigned different id & when tried to check output of NWF$("#" + txtRes) in quick Watch, it returns control with selector having different id.
You're right, I just have a try and reproduce the same issue, but i find a way to achieve it.
You can set the css class field on your text control like this :
Choose the name you want for css class
And after your javascript will be like this :
NWF$(".test input").val();
Works for me in every mode
Thanks a lot Jean. It's working. You saved my day
Thanks for selecting a "correct answer!" So helpful for others!
Ahah I had the exact same problem than Chitra and your solution helped me, so i thank you too