- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2020 01:23 AM
I have created a UI page in that I have created an html field of type = "text", How can I access the Value of text field in Processing Script.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2020 05:30 AM
Hi Susmitha,
Are you still looking for solution to this?
If yes then below is the sample UI page which will show you the content coming inside the processing script
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
<input type="hidden" id="contentvalue" name="contentvalue"/>
<input type="hidden" name="cancel_or_submit" id="cancel_or_submit" value=""/>
<textarea id="content" name="content" value=""/>
<g:dialog_buttons_ok_cancel ok_text="${gs.getMessage('OK')}" ok="return actionOK();" cancel="return cancel();"/>
</g:ui_form>
</j:jelly>
Client Script:
function actionOK() {
gel('contentvalue').value = gel('content').value;
return true;
}
function cancel() {
var c = gel('cancel_or_submit');
c.value = "cancel";
return true;
}
Processing Script:
gs.info("Text Area Value is: " + contentvalue);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2020 05:30 AM
Hi Susmitha,
Are you still looking for solution to this?
If yes then below is the sample UI page which will show you the content coming inside the processing script
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
<input type="hidden" id="contentvalue" name="contentvalue"/>
<input type="hidden" name="cancel_or_submit" id="cancel_or_submit" value=""/>
<textarea id="content" name="content" value=""/>
<g:dialog_buttons_ok_cancel ok_text="${gs.getMessage('OK')}" ok="return actionOK();" cancel="return cancel();"/>
</g:ui_form>
</j:jelly>
Client Script:
function actionOK() {
gel('contentvalue').value = gel('content').value;
return true;
}
function cancel() {
var c = gel('cancel_or_submit');
c.value = "cancel";
return true;
}
Processing Script:
gs.info("Text Area Value is: " + contentvalue);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2020 09:00 AM
Hi Susmitha,
Hope you are doing good.
Let me know if that answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2020 02:30 AM
Hope you are doing good.
Let me know if I have answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-01-2020 10:50 PM
Hope you are doing good.
Let me know if I have answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader