I use a controller to create a multi-page form. I save the submitted and unauthorized application data in the database field:
$serialized_data = $oCon->dbConn->real_escape_string( serialize($ctrl->getSessionContainer()) ); $oCon->dbConn->query( "INSERT INTO form_data SET (data) VALUES ('" . $serialized_data . "')" );
This works fine, but how do I return a saved object to the session for incomplete records?
Return only the return values ββwhen saving them to the database field using getValue() and
$ctrl->addDataSource(new HTML_QuickForm2_DataSource_Array($unserialized_data));
but I need the whole object and with a valid array of pages.
I believe the answer lies in this page , but I could not get it to work with any combination of storeDataSources() , addDataSource() and setDataSources() . It seems that the setSessionContainer() method is missing.
This is my first question on this forum, I tried to follow all the rules, please correct me if I make stupid mistakes or if this is a stupid question.
source share