Hi and thank you all for any help.
New in appgini and in php general.
My question is that i have a table with first_name, last_name and contact_name i want the user to write the first and second name and when he saves i want the field contact_name to get the values from first_name, last_name.
I have tried to add in hooks folder and in file main_tbl_contacts (which is my table name) in the function main_tbl_contacts_after_insert($data, $memberInfo, &$args) section the following line of code $data['contact_name'] = $data['last_name'] . ' ' . $data['first_name']; but is not working.
Thanks again for any info.
Combine 2 fields data into 1
-
- Posts: 11
- Joined: 2013-11-28 21:00
Re: Combine 2 fields data into 1
Yesssssss sorry guys i found it i had to put the code in main_tbl_contacts_before_insert and not (stupid me) in function main_tbl_contacts_after_insert
Thanks anyway.
Thanks anyway.