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.
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
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
Works for me in every mode