May 24th, 2011, 1:41 AM
(This post was last modified: May 24th, 2011, 2:05 AM by russellfeeed.)
Okay, I figured a way to create the history table, after you have used Form Backup. However you need to edit the Submission History code:
Edit formtools/modules/submission_history/global/code/actions.php
Change
to
i.e. you're changing the $_POST to $_REQUEST
Then hit this URL using your browser:
remember to put in your own domain, path to formtools and the correct form ID
Edit formtools/modules/submission_history/global/code/actions.php
Change
PHP Code:
switch ($_POST["action"])
{
case "create_history_table":
$form_id = $_POST["form_id"];
$form_info = ft_get_form($form_id);
$form_name = preg_replace("/\"/", '\"', $form_info["form_name"]);
list($success, $message) = sh_create_history_table($form_id);
$json = "{ \"success\": \"$success\", \"form_id\": \"$form_id\", \"form_name\": \"$form_name\" }";
echo $json;
break;
to
PHP Code:
switch ($_REQUEST["action"])
{
case "create_history_table":
$form_id = $_REQUEST["form_id"];
$form_info = ft_get_form($form_id);
$form_name = preg_replace("/\"/", '\"', $form_info["form_name"]);
list($success, $message) = sh_create_history_table($form_id);
$json = "{ \"success\": \"$success\", \"form_id\": \"$form_id\", \"form_name\": \"$form_name\" }";
echo $json;
break;
i.e. you're changing the $_POST to $_REQUEST
Then hit this URL using your browser:
Code:
http://www.yourdomain.com/formtools/modules/submission_history/global/code/actions.php?action=create_history_table&form_id=<yourformid>