Closed bkrajendra closed 8 years ago
It is not variable for now. If you want to do that quickly, just update https://github.com/vojtasvoboda/oc-userimportexport-plugin/blob/master/models/userimport/columns.yaml file.
@vojtasvoboda I tried this already but somehow its not updating in database. do I need any code to be added in model this is what ive done:
# ===================================
# Column Definitions
# ===================================
columns:
username:
label: rainlab.user::lang.user.username
searchable: true
invisible: true
name:
label: rainlab.user::lang.user.name
searchable: true
surname:
label: rainlab.user::lang.user.surname
searchable: true
invisible: true
email:
label: rainlab.user::lang.user.email
searchable: true
mobilef:
label: Fathers Mobile
searchable: true
mobilem:
label: Mothers Mobile
searchable: true
rollno:
label: Roll No
searchable: true
# street_addr:
# label: Street
# searchable: true
# city:
# label: City
# zip:
# label: ZIP
Ive these mobilef, mobilem and rollno columns in db already.
Yes, your moves are right. Last step is to extend RainLab User model and add new fillable fields:
// extend RainLab.User model
UserModel::extend(function($model) {
$model->addFillable(['mobilef', 'mobilem', 'rollno']);
});
See http://octobercms.com/docs/database/model#extending-models
hey @vojtasvoboda , thanks a lot. I forgot that. added it in plugin.php boot method and it worked like charm! Thanks.. nice simple plugin! I'll definitely contribute if i get time to work on it.!
I would appreciate more translations if you want to contribute :-) https://github.com/vojtasvoboda/oc-userimportexport-plugin/tree/master/lang
How to add more Database fields to import