This is a follow-up on my previous post, where I was trying to figure out how to maintain separation between the Joomla database tables that handle the UI of the website and the custom database tables that handle the actual Talking Owl AI logic and application.
I found a fantastic solution that works well.
To begin with, my Joomla installation is Joomla! 1.6.3 with two installed extensions:
PHP Module (Fiji Web Design), which allows me to enter any custom PHP into a module box that I want. (Similar to the custom HTML module, but allows you to use PHP)
ProForms (Mad4Media), which allows you to design custom input forms, do input validation and Captcha control, and store the data entered into Joomla Extension database tables handled by ProForms.
My challenge is: I want to use the ProForms functionality to allow users to enter in the information for creating a new Talking Owl on the site, but I want the data for the owl to end up in a separate set of custom tables that are handled by my own Talking Owl application and not ProForms or Joomla.
These are the steps I took:
- Create a Joomla article called "Your new Talking Owl has hatched!" with minimal content. (Something like "Congratulations!")
- Create a PHP module that is only rendered when that one page is displayed.
- In the ProForms area of the administration section of the site, change the ProForms settings so that after the form is submitted, it re-directs the user to the "Your new Talking Owl has hatched!" page.
The end result of all of this is the when the user submits the form, the form itself will save the data in the ProForms tables, the system will briefly re-direct the user to the "Congratulations" page, at which time the system will copy this data into your own custom tables, after which the user will be re-directed to the main page of the owl that was just created.