Form fields visible when click on UI actoin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2014 04:13 AM
I want the field to be visible on incident form when user click on form header button newly created. Then user enter the value for that fields and update the incident. Is it possible to create show form fields when user click button.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014 10:26 PM
Hi Ganesh,
You can do it via 2 client scripts as well. This way, if you want the button to perform some activity once user enters the value for that field, you dont have to get confused with how to write client and server code on the same UI action.
First write a UI policy or an onLoad client script to hide the field. Then you can write the below code in an onSubmit client script:-
function onSubmit() {
var action = g_form.getActionName();
if(action == '<your buttons action_name>'){
g_form.setVisible('<your_field_name>',true)
g_form.setMandatory('<your_field_name',true);
return false;
}
}
Hope this helps.
Thanks & Regards,
Hari