add option in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 09:49 PM
On load of sc_req_item i need to add one option in the state field which is already available in the choice list and is disabled for now for some reason so will the below code will work for adding it back ?
g_form.addOption('state','104');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2022 11:28 PM - edited 12-01-2022 11:29 PM
Hi @jobin1 ,
In addOption() method there is 4th parameter which accepts index i.e. position of the option, you can use it to arrange it, below the format:
g_form.addOption("field_name", "option_value", option_name", "option_index").
I hope this helps.
Regards,
Kamlesh