add new field and put in DB

sandman9 21 May, 2008
i have a form set up right now in joomla and it's set up to show Name, Email and Phone. I want to change this to First Name, Last Name, Email and Phone.

I know I can go into the form code tab and enter in those two fields there. Although i need to put this form data into the DB and don't know if by adding in those two fields, if it will screw anything up or if i have to do something else so the db will read these as db fields. Also I do not know how to get this into the db but i see a "MYSQL Statement? ENGINE or TYPE" whic I don't know is the right path or not.

Any help would be appricieated as i'm just trying to make those four fields and make it throw in the db.

S
GreyHead 21 May, 2008
Hi sandman9,

Important question - do you have any saved data that you need to keep?

If 'No': then copy the form in ChronoForms, rename it (I just add _1, or _2 at the end), add the new fields and save, then click the 'Create Data Table' link. Delete the old table (and the corresponding database table if you want to be tidy).

If 'Yes': Add two new fields to your database table using PHPMyAdmin or your preferred MySQL tool. Make a note of the new column order of the table - the new fields would normally be at the end. Add the fields to your form HTML taking care to use identical field names. Then edit the AutoGenerated Code tab to add two more entries to the end of the query in the same order as the column order. Save the form and run a couple of tests to make sure that everything is OK. (You can follow a similar procedure to remove the redundant Name field if you like but it will do no harm if you leave it.)

Bob
This topic is locked and no more replies can be posted.