- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 08:05 AM
There are 2 dropdown options for admin to select. If the admin select option #2 and type something in reference field search box but changed mind and select option #1, the ui reference field will change but the previous ui reference field still have remaining input value that need to be cleared. If click Option #2 again, it will switch back to first reference field but the old value that admin typed is still there. I have tried use gel('test').value = ""; but it isn't working. Anyone know why?
Here are my sample code,
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 11:29 AM
Try:
document.getElementById('sys_display.test').value = '';
document.getElementById('test').value = '';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 08:58 AM
Try 'g_form.setValue('your_variable', "")'
- Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 09:16 AM
I tried g_form.setValue('test', ""); It broke javascript.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 09:28 AM
Looks like you may need to use the sys_id:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 10:58 AM
I am not removing any data in table. I just need to clear the left over text on reference textbox that the user have not submit it.