Backing up and restoring your forms
We're going to complete this first chapter with a little security recipe and back up the form on which we worked so hard.
ChronoForms stores the Form information in the Joomla! database so it will get backed up whenever your database is backed up, but it's still often useful to take a backup copy.
This is also the best way of transferring a form from one site to another or to send it to someone else for help in debugging problems.
Getting ready
Any ChronoForms form will do fine.
How to do it...
1. Open the ChronoForms Forms Manager in your browser. Notice that towards the right of the Toolbar there is a group of three icons labeled Backup Form, Backup Forms, and Restore.
2. Next to the name of each form in the Forms Manager list is a checkbox that we use to select forms for actions like Backup. Check the box by newsletter_signup, and then click the Backup Form icon in the toolbar.
3. The Save File dialogue from your browser will open and you can save the form backup file in a convenient local folder.
Note
ChronoForms backup files are named
form_name.cfbak
. They are plain text files and can be opened in Notepad or any text editor.4. Now let's restore the form back into ChronoForms again. This will create a second form with the same name which is a potential problem, but we'll sort that out.
Click the Restore Form icon in the toolbar and you'll see a new screen:
5. Click the Browse... button, navigate to the
newsletter_signup.cfbak
file that you just saved, and click the submit file button to restore the form.Note
Notice the Cancel icon to the top right just in case you don't want to be here.
6. When the form is restored you are returned to the Forms Manager; there is a System Message saying Restored Successfully and there is a new entry in the Forms list. However, the new entry is almost identical to the previous one.
ChronoForms can tell the difference between these two forms here because they have different Form IDs (here it is 1 and 3; yours may be 1 and 2). However, when the forms are in use on your site the names are used to distinguish them, not the IDs; so having two forms with the same name can be a real problem.
7. You can change the name by using Wizard Edit and resaving with a different name, or you can click the Form name link to open the Form Editor, change the name in the first box in the General tab, and resave the form.
Note
Use the icons at the top right to save the renamed form — Save will save and return you to the Form Manager; Apply will save and keep you in the Form Editor; Cancel will return you to the Form Manager without saving any changes (since the last Apply or Save).
There's more...
You'll remember that there's also a Backup Forms icon. You can use this to backup several forms (or all of your forms) at the same time. Just select the forms using the checkboxes by the Form names and then click the Backup Forms icon. All of your forms will be backed up into a single .cfxbak
file. This can be restored in just the same way as a .cfbak
file for a single form.
Using Backup and Restore is a complicated way to make a copy of a form. You can use the Copy Form icon in the toolbar instead. Again, you must change the name of one of the two forms before trying to use them.
Lastly, if you end up with copies that you don't need, the Delete icon in the toolbar will delete one or more forms. There is no confirmation request and no undelete; so use with care!