Jump to content

Customer/registration custom fields - 8.1


Recommended Posts

Hi all,

I have added custom fields to customer registration form, and have decided to use custom database table for new fields (as per guidelines, we should not modify core database tables).

Does anybody know how I can save those properties to database? There is hook after the customer has been created (actionCustomerAccountAdd), but in that hook i get only Customer data with core property, not the custom ones.

 

Regards.

 

Link to comment
Share on other sites

I could be wrong but i did something similar for an address field i created it like this in the first hook
 

        $test = new FormField();
        $test->setName('hype');
        $test->setType('select');
...

and in the second hook (for you actionCustomerAccountAdd) i just got the value like this

$test= Tools::getValue('hype');


and then saved it via an Db::getInstance()... to the database

i think it should also apply for your case but I'm not sure

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...