Catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 07:18 AM - edited ‎09-24-2023 11:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2023 07:29 AM
function onChange(control, oldValue, newValue, isLoading) {
if (newValue !== '') {
try {
var mobileNumber = newValue; // Assuming newValue is the mobile number field.
var name = 'Deepika'; // Replace with the name or string you want to append.
var regex = /^\d{10}$/;
if (!regex.test(mobileNumber)) {
alert(getMessage("Please enter a valid 10-digit number"));
} else {
// Concatenate the mobile number and the name
var combinedValue = mobileNumber + ' ' + name;
// Set the value of the target field (where you want to display the combined value)
g_form.setValue('target_field', combinedValue);
}
} catch (e) {
alert(e.message);
}
}
}