concatenate field values

Questions related to using nuBuilder Forte.

concatenate field values

Unread postby Marvo » Thu Nov 18, 2021 2:21 am

Hi

I have form/table with fields:
first_name
last_name
full_name

I want the user to complete first and last name and automatically 'calculate' full_name
I have managed this (not sure how) by setting full_name as a input/text field and on the customer code tab onblur: full_name.value = first_name.value + " " + last_name.value;

This seems to work fine (goodness knows how I did that!) - but the concatenated value is not stored or displayed in the Browse form.
Do I need to do something different to actually save the value?

I read in another thread that I may need to trigger a Change event with some JS - I have no idea what that is or where to do it!

Thanks
Marvo
 
Posts: 12
Joined: Tue Nov 16, 2021 7:41 am
nuBuilder Version: 4.5

Re: concatenate field values

Unread postby kev1n » Thu Nov 18, 2021 2:38 am

Code: Select all
nuSetValue("full_name",  first_name.value + " " + last_name.value);
kev1n
nuBuilder Team
 
Posts: 2135
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: concatenate field values

Unread postby Marvo » Thu Nov 18, 2021 6:50 am

Sorted! Thanks Kevin
Marvo
 
Posts: 12
Joined: Tue Nov 16, 2021 7:41 am
nuBuilder Version: 4.5


Return to General

Who is online

Users browsing this forum: No registered users and 26 guests