populate hidden field with other data field

Populate a hidden field with combined data from other fields.

Overview

The form needed to combine first and last name into a full name for Joomla registration, which only accepts a single name field.
Add a Custom Code action before the registration action to concatenate the name fields and assign the value to a new hidden field.

Answered
li livingwebstudio 17 Oct, 2015
Hi everybody,
I need help.. I have form registration in chronoforom with the fields "name" and "surname": is it possible to have in hidden filed the value "name surname"?
joomla registration ask only "name" but I want to store all the information .. is it possible?
Gr GreyHead 17 Oct, 2015
Answer
1 Likes
Hi livingwebstudio,

You can add a Custom Code action in the On Submit event and move it up before the Joomla! registration action. Add code like this:
<?php
$form->data['full_name'] = $form->data['name'].' '.$form->data['surname'];
?>
Then use full_name in the Joomla! registration action.

Bob
This topic is locked and no more replies can be posted.