
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 12:09 PM
Hello,
I am trying to clear the value(s) of a Service Portal form when the user reverses their selection. On our Mobile Phone Request form, a user may select "New" or "Upgrade" as a request type at the beginning which will make some fields visible based on their selection and they may input data into these fields. If they choose to switch their request type, some fields will disappear with their input selections while others reappear asking for new or different input. When this occurs I want to blank their values or reset the fields back to an initial state so they are not submitted with the form variables of the request catalog item. This has caused confusion for when completing tasks because the form variables have input for both request types.
I have tried various g.form methods but not able to get any to work. Can you please assist with the proper code to blank/reset.
Thank you,
-Wesley
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 02:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 02:07 PM
Hi Wesley
From your screenshot it looks like you have put g.form but it should be g_form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 02:08 PM
It should be g_form.clearValue('u_standard_device');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2017 02:15 PM
Crikey, I feel stupid!
I had tried so many other commands then when I typed it g_from didn't even noticed that used a period vs. underscore.
Thanks
-Wesley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2018 12:22 PM
What if I don't want to clear the value but want to set it back to the default. i.e. the default i designated at the time of creating the variable.Thanks.