The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Take submission OFFLINE with out deleting. - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Take submission OFFLINE with out deleting. (/showthread.php?tid=826) |
Take submission OFFLINE with out deleting. - bwaye - Aug 27th, 2010 I use form tools as a CMS. Can I take a submission/post off line without deleting? RE: Take submission OFFLINE with out deleting. - Ben - Aug 28th, 2010 Hi bwaye, Sure! I should really write a tutorial on how to do this - it's a handy trick to do all sorts of things. Here's the gist of it: add a new field to your database table (not form) called "Status". In your case, This would be a radio button with two options "online", "offline". Then, for your form View(s), just add a new Standard Filter that only shows results that are set to "Online". For more info on Views and the filters, see: http://docs.formtools.org/userdoc/index.php?page=view_filters Then, instead of deleting the submissions, you would just mark them as "offline". They would then disappear from view - but still be in the database. - Ben P.S. I'm about half-way through a new module called "Submission History". This may help as well. What it does is track all changes made to your submissions - who made them, when, and what changed between each edit. The module also keeps track of submissions that were deleted from the main form, so you always have a paper trail of deleted submissions. RE: Take submission OFFLINE with out deleting. - bwaye - Sep 1st, 2010 (Aug 28th, 2010, 9:08 AM)Ben Wrote: Hi bwaye, GREAT - will give a try a post back. RE: Take submission OFFLINE with out deleting. - bwaye - Sep 1st, 2010 (Sep 1st, 2010, 7:13 AM)bwaye Wrote:(Aug 28th, 2010, 9:08 AM)Ben Wrote: Hi bwaye, THANKS BEN! work like a charm - Here is the code i used to filter the results: mysql_select_db($database_database, $database); $query_coupons = "SELECT * FROM ft_form_2 WHERE `online` = 'online' ORDER BY name ASC"; $query_limit_coupons = sprintf("%s LIMIT %d, %d", $query_coupons, $startRow_coupons, $maxRows_coupons); $coupons = mysql_query($query_limit_coupons, $database) or die(mysql_error()); $row_coupons = mysql_fetch_assoc($coupons); |