- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 03:18 AM
Hello all,
I have 4 fields 1- Org name, 2- Name (read-only), City, and description on my form. When the user clicks on the submit button, Value from Org Name will copy into the Name field.
I really appreciate any help you can provide.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 03:22 AM
Why submit? You can try the same with the onChange client script
1.) Write onChange client script on org name field with the below script
2.) By using the below script, Whatever you input in the org name same populates in the name field as well
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue){
g_form.setValue('name', newValue) //set name field with newValue, newValue is org name value
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 03:22 AM
Why submit? You can try the same with the onChange client script
1.) Write onChange client script on org name field with the below script
2.) By using the below script, Whatever you input in the org name same populates in the name field as well
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue){
g_form.setValue('name', newValue) //set name field with newValue, newValue is org name value
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 03:43 AM
Hello
@Sai Kumar,
Thank you for your answer.
I am already using the onChange client script on Org name, that's why I want to perform this task on submit, I know I can change the order, but for the safe side want to try on onSubmit.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 03:51 AM
Since you already have an OnChange() script for Org name why not add a line to make it work in the same script itself. No need of separate onSubmit() as it will work as expected even onChange() & suffice your need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 04:11 AM
Okay. Thank you