- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:56 AM
Hello, I would like to ask why the select boxes don't show when I select the checkboxes. I don't know if this is possible in catalog client script. Any suggestion is appreciated. Thank you.
Here's my script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:23 AM - edited 11-30-2023 07:24 AM
Based on my understanding of your code, I would suggest that within your new onChange client scripts on each Checkbox, you can have a condition like -
if(g_form.getValue('checkbox1')==true && g_form.getValue('request_type')=='Account Creation')
{
//show the select-box part
}
This way whenever RequestType if 'Delete Account' & even if CheckBox1 is true, you won't be showing SelectBoxes. Same logic you can put in all the other onChange client scripts as well.
Do mark this response as CORRECT / HELPFUL if you find it appropriate.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:59 AM
This script only runs when the request_type value changes. If you need additional functionality to run when the check boxes are selected then you need to create onChange client scripts for each of those specific checkbox variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:15 AM
Hi Elijah,
Thank you for your reply.
If I will add an onChange client script on each Checkboxes1,2,3. It will also affect the request_type = "Delete Account". It will display also the selectbox1,2,3. Do I need to create new variables for Delete Account? I want to reuse the variables for checkboxes. What do you suggest? Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:20 AM
No it should be fine. You want to separate out the scripts so that it makes sense. onChange of request type, we hide/show fields appropriately. onChange of checkbox1, checkbox2, etc. we have a separate script that hides/shows/updates what it needs to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:23 AM - edited 11-30-2023 07:24 AM
Based on my understanding of your code, I would suggest that within your new onChange client scripts on each Checkbox, you can have a condition like -
if(g_form.getValue('checkbox1')==true && g_form.getValue('request_type')=='Account Creation')
{
//show the select-box part
}
This way whenever RequestType if 'Delete Account' & even if CheckBox1 is true, you won't be showing SelectBoxes. Same logic you can put in all the other onChange client scripts as well.
Do mark this response as CORRECT / HELPFUL if you find it appropriate.