Page 1 of 1
Adding fields to registration forms
Posted: Mon Jan 28, 2008 10:24 am
by lufituaeb
Hello!
I have a problem that i hope you will be able to help with. I have a forum script that uses a self installer, but I wish to add 3 long text fields (a bit like a review box, or comments box) to each profile of the people who register. Can anyone give me a run down of the code that I should add, and the database entries to make. Or point me in the direction of a good tutorial?
I hope I have explained this adequately...
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 10:31 am
by JAM
Difficult to say as it varies depending on the forum software itself. phpBB3 (as the one youre using right now, here at devnet) has builtin functions fopr admins to add custom profilefields of various types.
What software are you using?
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 10:50 am
by lufituaeb
Well, its actually e-shop software, shop-script. I dunno why I said it was a forum, I guess I dont like talking about my new business. But that's it. It should be a standard relationship between a form field to a database entry, only I'm not so familiar with what the code should be, and how to mod the existing script. Should I do it after Ive installed it, and manually add entries to the database?
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 11:01 am
by JAM
Also depends from how the original creator once created the script.
You could open install.php (or whatever starts the installation) to see what actually happens. Most php files are likely 'as is' both before and after the install and the only installing parts
usually is SQL being added to the database after a 'config.php' is created.
The SQL usually comes as standard *.sql/*.php files somewhere. Those you should be able to edit yourself directly. The pages and templates of the actual look is likely aswell just editable prior to installation.
Alot of 'likely' and 'usually' here, but it's hard to explain without looking at what it is. I'd not rate it as a job for novice users either hence the lack of tutorials and guides...
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 11:39 am
by lufituaeb
can you give me a heads up on what 'code' would be used to add the text field that I need. And if the SQL entries should be anything special to accomodate multiple lines. The type of field i want is somethign like a comments box or personal description box. The boxes I need must be big and simple, but associated with each user.
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 11:55 am
by JAM
Not on the fly like this, no. Not me that is. Perhaps some of the guru's here might be able to help out tho...
Id personally install the software to a folder, then start adding some SQL fields in good places. The 'users' table would be a good idea for a comment. A varchar(255) would be sufficient for a brief comment (can take multible lines with linebreak characters) but you could use a text aswell.
Then I'd find the templatepage where you want the box shown, and add an <textarea> there. Then the same in the part of the template where the users changes his personal information...
Again, it's hard to judge from case to case, especially when not having the software in front of you. Ask the software creators. Perhaps they have a forum liek this somewhere where coders help out with these kind of questions.
Ask for help in the job-searching part of these forums aswell. Perhaps someone can help you out that way...
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 12:18 pm
by lufituaeb
well thanks for the replies, they already are giving me a place to start with this. The text fields would need to be pretty big though for what i need. asking on the shop script forums is a good idea too. cheers!
Re: Adding fields to registration forms
Posted: Mon Jan 28, 2008 10:31 pm
by lufituaeb
If anyone has any more advice on this it would be very welcome