Page 1 of 1

concatenate field values

Posted: Wed Nov 17, 2021 5:51 pm
by Marvo
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

Re: concatenate field values

Posted: Wed Nov 17, 2021 6:08 pm
by kev1n

Code: Select all

nuSetValue("full_name",  first_name.value + " " + last_name.value);

Re: concatenate field values

Posted: Wed Nov 17, 2021 10:20 pm
by Marvo
Sorted! Thanks Kevin