I need two extended fields, "firstname" and "lastname", but I don't want to have additional the built in field "fullname". How can I combine the two separate fields in the field "fullname"?
[ed. note: istvan.velsz last edited this post 12 years, 11 months ago.]
-
☆ A M B ☆
- 24,524 Posts
I've done this in two different ways. One was to use Javascript to populate a hidden field with the content of the two fields. The second was to have the form's processing combine the two fields.
Thanks, I solved it with some Javascript
I'm facing this issue currently.
With the above, if there's validation on first and last names, and the user leaves one of them blank, how do I pre-populate value=""
Thanks Kristoffer, I will try this now.
Is the a pre or post hook?
Sorry, I should have said that my code should be used as a pre hook.
The pre hook is executed before the fields array are saved to the database so all edits to that array in the hook should be saved.
Glad that it worked anyway.