- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2022 02:46 AM
I have a custom widget that is displayed as a modal pop-up on a page in our service portal.
I am trying to find a way, to populate a field on the service portal page from within the client-script of the widget. Is this possible and how?
See attached image for what I have so far.
The error in the browser console that I am receiving is that g_form is not a function:
"TypeError: g_form.setValue is not a function"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2022 02:58 AM
Hi,
You can bind the data to the field using ng-model. No need to to set value in the client script :
Does this solve the purpose?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2022 02:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2022 05:43 AM
Thank you but I don't want to populate a field in the HTML of the widget. I want to populate a field on the service portal page on which this widget is being displayed. Hope I am explaining it right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 03:32 AM
Hoping someone can help me here.
Just to clarify, I want to take the server-script response of the widget and use it to populate a form field that is on the PAGE in the service portal on/in which this widget is loaded after they fill out the fields in the widget and click submit.
So desired workflow is:
- User is on a specific page in our service portal and clicks a button which pops up a spmodal with a widget in it.
- User fills out the fields in the widget and presses on submit.
- Now a form field on the current page is filled out based on the server-script response of the widget.