These are chat archives for dektrium/yii2-user

30th
Mar 2015
ajkosh
@ajkosh
Mar 30 2015 10:13
how to add extra fields in registration page
Dmitry Erofeev
@dmeroff
Mar 30 2015 10:41

At the moment there are some troubles when adding new fields to registration form. The registration process will be improved in the version 0.9.5, but at the moment you can do following:

  • 1) add new fields to the user table
  • 2) override User model
  • 3) add those fields to the User model's register scenario and to the validation rules (don't forget to merge parent scenarios and rules)
  • 4) override Registration form
  • 5) add new fields to the Registration form by defining new properties
  • 6) add those fields to the Registration form's validation rules (don't forget to merge parent rules)
  • 7) override view file and add new fields there

So as you can see, at the moment it is a little bit hard, and there aren't any docs describing this at the moment.

ajkosh
@ajkosh
Mar 30 2015 17:16
thnks