Php Form Builder Framework Populate Form from Session -
i`m using pfbc framework setting forms. have small checkout form need post (step 1 ). once validated , posted form redirects next page (step 2).
i want enable customers change form input when using button (browser).
somehow dont see manage pre populate fields session. form classes defined in form:php
$form = new form("question"); // prevent bootstrap , jquery re-loading, loaded in doc head $form->configure(array("prevent" => array("jquery"), "view" => new view_sidebyside, "labeltoplaceholder" => 0)); $form->addelement(new element_hidden("form", "question")); $form->addelement(new element_html('<hr />')); $form->addelement(new element_select("type:", "type", $options, array("id" => "type", "class" => "form-control", "required" => 1, "data-placeholder" => "kies een type"))); $form->addelement(new element_textbox("titel:", "title", array("id" => "title", "class" => "form-control", "required" => 1, "placeholder" => "geef hier een duidelijke titel op"))); $form->addelement(new element_button("verstuur", "submit", array("id" => "submit"))); $form->addelement(new element_html('hr />')); $form->render(); echo $id; //----------after form has been submitted---------- if ($_post["form"] == 'question') { //additionele values //unset values dont belong in db unset($_post["form"]); //enter data db //$api->dbsave('application', $_post); //$id = mysql_insert_id(); //$_session['formpost'] = $id; //clear values , redirect form::clearvalues("question"); header("location: " . $this->root . "next-page/step-2/"); }
Comments
Post a Comment