I would like to add gender field to register form so when user register he should to choose between male or female but i didn't find a way to save this to db
I would like to add gender field to register form so when user register he should to choose between male or female but i didn't find a way to save this to db
Read the section titled Modifying the forum edit form in the docs. It explains how to use the template modification system which is what you need to do.
Also i extended registration service with this code:
PHP:
public function setFromInput(array $input)
{
if (isset($input['gender']))
{
$this->user->gender = $input['gender'];
}
return parent::setFromInput($input);
}
Finally add column to user entity but when i try to register new user gender column doesn't affected.
So i'm sure i miss somthing but i don't know where.
I assume that you've also added your gender column to the User table either manually or through a Setup file in your add-on.
If you are sure your template modification is actually working and is providing you with a value, then I have no idea why it is not working for you.
Are you getting any errors?