Mar 4th, 2009, 2:41 PM
Thanks! I rather like this module too... Awfully powerful.
Interesting idea...! One solution would be to create an "SQL" Export Type in the Export Manager that generates the data in a giant list of SQL insert statements. This much would be pretty simple. You could then rig it up to generate that information on a file on your server, which you could then use (say on a cron job / scheduled task) to be imported to the "live" database. Do-able, definitely, but dealing with the cron stuff would be rather fussy... plus there's no good way to merge the information - you'd probably end up empting the table right and then re-insert all values.
But from what you've told me so far, perhaps this solution may be a whole lot simpler:
1. Drop the "live" table altogether.
2. Add a "live" field to your form (which is only accessible by you, the administrator to set to "yes" or "no").
3. That's pretty much it! That information (i.e. the live data) can then be displayed on your website using the API. I wrote a couple of functions for exactly this purpose: ft_api_show_submissions and ft_api_show_submission.
You can customize them to show the information in whatever manner you want - e.g. showing a subset of the fields, only in a specific order.
You may well have other reasons to keep the live table, in which case this is rather moot. But let me know if I can help at all!
- Ben
Quote:how complex do you think it would be to add a "Direct Export/Import" option. Basically, upon approval...my data can be merged/moved from Form Tools into my "live data" table.
Interesting idea...! One solution would be to create an "SQL" Export Type in the Export Manager that generates the data in a giant list of SQL insert statements. This much would be pretty simple. You could then rig it up to generate that information on a file on your server, which you could then use (say on a cron job / scheduled task) to be imported to the "live" database. Do-able, definitely, but dealing with the cron stuff would be rather fussy... plus there's no good way to merge the information - you'd probably end up empting the table right and then re-insert all values.
But from what you've told me so far, perhaps this solution may be a whole lot simpler:
1. Drop the "live" table altogether.
2. Add a "live" field to your form (which is only accessible by you, the administrator to set to "yes" or "no").
3. That's pretty much it! That information (i.e. the live data) can then be displayed on your website using the API. I wrote a couple of functions for exactly this purpose: ft_api_show_submissions and ft_api_show_submission.
You can customize them to show the information in whatever manner you want - e.g. showing a subset of the fields, only in a specific order.
You may well have other reasons to keep the live table, in which case this is rather moot. But let me know if I can help at all!
- Ben