![Picture of ray Picture of ray](/graphics/unknown.gif)
ray - 2010-03-13 21:26:13
if($doit)
{
//$form->ReadOnly=1;
//Save routine
$idfactuur = save_xmlfactuur($form);
//$form->SetValue($updatedidfactuur, $idfactuur);
}
In this piece of code you have created the opportunity to save submitted form data. Because the function, where this code is at, returns the form object i can't easily return value's retrieved from the save routine. So let's say I want the last inserted ID from the mysql save query, how can I pass this ID back to my mainpage, where I create the forms? I tried to use SetValue/GetValue methods, so I could get the value with $form2->GetValue($variablename,0,0) but that does not work.
The code that is inside my mainpage:
//Maak een nieuw form object dmv functions_forms
$form2 = form_docentenfacturatie_bewaarfactuur($iddocent, $idfactuur, $xmlfactuur);
//Toon form
$form2->StartLayoutCapture();
$body_template="templates/forms/form_body_docentenfacturatie_bewaarfactuur_top.html.php";
require("templates/forms/form_frame_docentenfacturatie_bewaarfactuur_top.html.php");
$form2->EndLayoutCapture();