- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2020 04:25 AM
Hi Everyone,
I have fields like Name, Address, Country etc on a form, and I have the same related fields in a section of the same form. I have a Yes/No field on the form, when the user select yes, I need to copy the values in Name, Address, Country to related fields in other section of the same form. Could you please help me on this. Thanks in Advance
Regards,
Rakesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2020 04:32 AM
Hi,
Create onChange client script that run when the Yes selected in Yes/No field.
Keep the script like this
//check field name and change
var copiedFrom = ['name', 'address', 'country'];
var copiedTo = ['other_name', 'other_address', 'other_country'];
if (newValue == 'yes') {
for (var i = 0; i < copiedFrom.length; i++) {
g_form.setValue(copiedTo[i], g_form.getValue(copiedFrom[i]));
}
}
Regards,
JAS

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2020 04:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2020 04:32 AM
Hi,
Create onChange client script that run when the Yes selected in Yes/No field.
Keep the script like this
//check field name and change
var copiedFrom = ['name', 'address', 'country'];
var copiedTo = ['other_name', 'other_address', 'other_country'];
if (newValue == 'yes') {
for (var i = 0; i < copiedFrom.length; i++) {
g_form.setValue(copiedTo[i], g_form.getValue(copiedFrom[i]));
}
}
Regards,
JAS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 03:55 AM
Thank you Antony. It worked great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2020 07:50 AM
Glad it worked!
Regards,
JAS