- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 04:39 AM
Hi,
I have on change client script that remove some options from a choice field if some condition is met. How can i put back all options at once if the conidition is not met instead of typing 35 lines of g_form.addOption?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 04:49 AM - edited ‎03-04-2024 04:50 AM
Hi Alon,
Unfortunately there is no option to do that unless the form is reloaded. If you remove the choices individually you will need to add them back individually as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 04:49 AM
Hi @Alon Grod ,
No there is no such option to add all options at once, if you are using script to populate choice then you have to write code for both if condition is met and if condition is not met like with in "if", "else if" .
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 04:50 AM
@swathisarang98 is there any way to get the choices and populate them using for loop?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 04:52 AM - edited ‎03-04-2024 04:53 AM
@Alon Grod no, there is no such option, if my response helped you in any way please accept my solution and mark it helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 04:49 AM - edited ‎03-04-2024 04:50 AM
Hi Alon,
Unfortunately there is no option to do that unless the form is reloaded. If you remove the choices individually you will need to add them back individually as well.