Fetching value from HTML part of widget to client or server side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 12:57 AM
I have created a widgets which holds fields created by with html tag.(ex. <input type="text" name="message" id="user_input">).
I would like to fetch the data entered in that field to my client or server side.
How can we do that?? Please suggest..
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 01:07 AM
Hi Manoj
HTML:
<input type="text" name="message" id="user_input" ng-model = "c.message">
Client : //get value in client script
var message = c.message; // message will contain value entered in HTML form
//To call it on server side set c.data.message
c.data.message = c.message;
server : // get data on server side
input.message;
Mark if correct/helpful
Regards,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:54 AM
Thanks for the solution but if we have multiple input tags then for each tag we have to specify ng-model??
Or is there any other way?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 01:07 AM
This should answer your question as it is a hello world widget with text boxes - https://www.youtube.com/watch?v=3mvUTgomZPc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2018 01:14 AM
Dear уmanojs749,
First thing first, you can fetch the info on the client side.
To do so, you can use following method:
declare a varibale, and use api
var variable = document.getElementById('sys_id_of_the_element');
variable.value would print the input in the field;
provide more details to get more definitive answer