Sep 11th, 2011, 9:51 PM
Hi Ben,
I Manage to link the data to my page and I found the codes needed to submit the updated form.
The return I get from $g_success is true and everything seems to be working properly. However the real data in the database is not updated.
Did I miss something? What else is needed to update the data from the form?
Also I tried to use Submission account module, but it did not show the editable fields after the user is logged in. Is this a bug?
I Manage to link the data to my page and I found the codes needed to submit the updated form.
Code:
$editable_field_ids = _ft_get_editable_view_fields($view_id);
if (isset($_POST) && !empty($_POST))
{
// add the view ID to the request hash, for use by the ft_update_submission function
$request["view_id"] = $view_id;
$request["editable_field_ids"] = $editable_field_ids;
$request["context"] = "submission_accounts";
list($g_success, $g_message) = ft_update_submission($form_id, $submission_id, $request);
// required. The reason being, this setting determines whether the submission IDs in the current form-view-search
// are cached. Any time the data changes, the submission may then belong to different Views, so we need to re-cache it
$_SESSION["ft"]["new_search"] = "yes";
var_dump( $g_message);
}
The return I get from $g_success is true and everything seems to be working properly. However the real data in the database is not updated.
Did I miss something? What else is needed to update the data from the form?
Also I tried to use Submission account module, but it did not show the editable fields after the user is logged in. Is this a bug?