Chronoforms: Create a new table for an existing form
This procedure describes how to create a new table to save the data from a form you have updated to a new database table, using ChronoForms version 5. More detailed documentation on using ChronoForms 5 can be found here.
Backup the old data table
- Log into the Joomla! administrator page for your web site
- Ignore the message "Your ChronoForms installation on webdevel.sas.rutgers.edu:443 is NOT validated." Chronoforms will still work.
- In Forms Manager, find the form and select the existing table from the dropdown menu for Connected Tables
- Click Backup table to export the entire form to a CSV file.
- Save that file and open it to verify that all the data has been saved
Creating a new data table
- Back in the Forms Manager, check the box to the left of the form that you would like to configure to save data.
- Click the Create table button at the top.
- At the "Create table" page, replace the "#__" portion of the Table Name with the actual database table prefix for your web site (e.g. j17_ or j25_).
- (Optional) Clear the check boxes for any fields that you do not need to save into the database (for example, "captcha"). Do not unselect the "cf_id" field since it is the primary key!
- Click "Save" to the upper right.
Modify the form to save data to the new table
- In Forms Manager, click on the name of the form with the new table.
- Click the Setup tab.
- Make sure DB Save is an event under OnSubmit.
- If DB Save does not show in the On Submit section, click Data Management (on the left) and then drag DB Save to the On Submit area.
- Click the blue Edit button for DB Save.
- A new window will open. Verify that "Enabled" = Yes
- For "Table name" select the newly created table.
- (Optional) Click the DB Viewer tab and enter field names. They will be added as columns to the table's list view for this form. Without doing this, the table list preview will only show an ID number and the "Created Date/Time". Doing this makes the list show useful information.
- The format to use here is, one entry per line: field_name=whatever column heading you want. The field name comes from the field settings. It should not contain any spaces or special characters. The column heading can be different.
- Click Save and Close.