Last name ,first letter autopopulate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 05:13 AM
I have created a variable - name
And another variable- last name
So whenever the user enters last name(ex-john) then first letter "j" should populate in name field.
Require client script for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 05:19 AM
Hello @User_267
You need to write the onChange Client Script :-
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var name = g_form.getValue('last_name_field_name');
var array = name.split("");
g_form.setValue("name_field", array[0]);
}
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 05:28 AM
It's not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 05:29 AM
Hello @User_267
Can you pls share the screenshot the code which you wrote.
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2023 05:34 AM
Hello @User_267
The below line needs to be modified in above code.
var array[] = name.split("");
Plz mark my solution as Accept, If you find it helpful.
Regards,
Samaksh