- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 06:24 AM - edited 03-20-2024 06:29 AM
Hi All,
I have created a field called "text" as a yes/no kind of variable so, when user selects the text as yes then we i have through an error meassge.
i have created like this onChange client script field as text
its not working as expected can someone help me here ..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 07:15 AM
Please validate the backend name of your choices inside dictionary of 'text' field. I am assuming Yes as true and no as false. Below is the script:
function onChangeText() {
var output = g_form.getValue('text');
if (output == 'true') {
g_form.addErrorMessage('Error message: You selected "Yes" for the text field.');
} else {
g_form.clearMessages(); // Clear any existing error messages
}
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:54 AM
Form does'nt get submitted for onchage client script, Try using on submit client script.
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 07:18 AM
Hello All,
I have tried all the scripts but no luck.
can someone help me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:39 AM
Please use on submit client script and try once