Osclass forums

Support forums => Tips, tricks, and tutorials => Topic started by: sanam on June 28, 2014, 01:30:22 pm

Title: Adding some more field at the time of user registration
Post by: sanam on June 28, 2014, 01:30:22 pm
Hiiii,
I would like to add some additional field at the time of registration.I modified code in user-register.php ,but i don't know how to connect this field to database.I want these extra field as radio button to choose the user type.
Can anyone tell me the tips for this.
Title: Re: Adding some more field at the time of user registration
Post by: zasami on June 28, 2014, 01:59:47 pm
if you wonte tu use a chek box, add a hidden inpute lk this <input type ="hidden"  name="b_company"" id="b_company" value ="0">
and add a js code to chnache the value wen chekbox change,
chebox value = 1 --->company
check value = 0 --->private user

this all Osclass do the last off work

but in my site i use a select  it is mors simple
Code: [Select]
<select  name="b_company" id="b_company"><option value="0">User</option><option value="1">Entreprise</option></select>
good luck

Title: Re: Adding some more field at the time of user registration
Post by: sanam on June 28, 2014, 02:25:18 pm
Thanku very much for your reply.I ll try it out :)
Title: Re: Adding some more field at the time of user registration
Post by: sanam on June 29, 2014, 01:29:56 pm
I found it now i added some objects to array in user.form.php. Now it working perfectly... 8 ;)
Title: Re: Adding some more field at the time of user registration
Post by: zasami on June 30, 2014, 01:58:44 pm
 user.form.php is a cor of osclass, remember that if you update osclass you lose the modification
Title: Re: Adding some more field at the time of user registration
Post by: monah on February 05, 2015, 09:03:35 am
sample code can someone throw?