- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2025 11:41 PM
I have a requirement and I want to execute a OnChange client script when the form loads. Is this possible? Any help would be much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 09:38 PM
Yes Buddy, It is possible to use OnChange Client script at OnLoad.
I am assuming that the task(For Onload and Onchange) is same, then you simply remove isLoading from line 2 and it will work same for load and change.
Please mark my response correct and helpful, if it helps you.
Please reply if any issue happens.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 09:50 PM
Hello @Arishmit
- Yes, you can use the same onChange client script to trigger when the form loads.
- This can be achieved by simply removing the isLoading check from the onChange client script.
Syntax for Onchange change client script to execute when form loads:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue === '') {
return;
}
// Type your script here
}
Note: Removing the isLoading condition ensures that the script runs even when the form loads.
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 09:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 10:02 PM
Hi @Arishmit,
We can execute a OnChange client script when the form loads by removing the isLoading from the onChange client script.
isLoading - it works at the time of form loading, at this time of loading if any changes happens at that field in which onchange client script is written it neglect that changes or it didn't consider that changes.
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thanks!