$pdocrud = new PDOCrud(); $pdocrud->formStaticFields("personalinfo", "html", ""); $pdocrud->formStaticFields("personalinfo1", "html", "PDOCrud Order Form
Please Fill in the form below
"); $pdocrud->fieldDisplayOrder(array("personalinfo", "personalinfo1")); $pdocrud->formFields(array("personalinfo", "personalinfo1", "first_name", "last_name", "email", "contact_no", "gender", "billing_address_line_1", "billing_address_line_2", "billing_city", "billing_state", "billing_postal_code", "billing_country", "shipping_address_line_1", "shipping_address_line_2", "shipping_city", "shipping_state", "shipping_country", "shipping_postal_code", "payment_method")); $pdocrud->fieldAttributes("first_name", array("placeholder" => "First name")); //add placeholder attribute $pdocrud->fieldAttributes("last_name", array("placeholder" => "Last name")); //add placeholder attribute $pdocrud->fieldAttributes("email", array("placeholder" => "Email")); //add placeholder attribute $pdocrud->fieldAttributes("contact_no", array("placeholder" => "Contact Number")); //add placeholder attribute $pdocrud->fieldAttributes("billing_address_line_1", array("placeholder" => "Billing Address Line1")); //add placeholder attribute $pdocrud->fieldAttributes("billing_address_line_2", array("placeholder" => "Billing Address Line2")); //add placeholder attribute $pdocrud->fieldAttributes("billing_city", array("placeholder" => "Billing City")); //add placeholder attribute $pdocrud->fieldAttributes("billing_state", array("placeholder" => "Billing State")); //add placeholder attribute $pdocrud->fieldAttributes("billing_postal_code", array("placeholder" => "Billing Postal Code")); //add placeholder attribute $pdocrud->fieldAttributes("billing_country", array("placeholder" => "Billing Country")); //add placeholder attribute $pdocrud->fieldAttributes("shipping_address_line_1", array("placeholder" => "Shipping Address Line1")); //add placeholder attribute $pdocrud->fieldAttributes("shipping_address_line_2", array("placeholder" => "Shipping Address Line2")); //add placeholder attribute $pdocrud->fieldAttributes("shipping_city", array("placeholder" => "Shipping City")); //add placeholder attribute $pdocrud->fieldAttributes("shipping_state", array("placeholder" => "Shipping State")); //add placeholder attribute $pdocrud->fieldAttributes("shipping_postal_code", array("placeholder" => "Shipping Postal Code")); //add placeholder attribute $pdocrud->fieldAttributes("shipping_country", array("placeholder" => "Shipping Country")); //add placeholder attribute $pdocrud->fieldTypes("gender", "radio"); //change donation amount to radio button $pdocrud->fieldDataBinding("gender", array("Male", "Female"), "", "", "array"); //add data for radio button $pdocrud->fieldTypes("city", "select"); //change type to select $pdocrud->fieldDataBinding("city", "city", "city_id", "city_name", "db"); //add data using another table name city $pdocrud->fieldTypes("state", "select"); //change type to select $pdocrud->fieldDataBinding("state", "state", "state_id", "state_name", "db"); //add data using another table name country $pdocrud->fieldTypes("country", "select"); //change type to select $pdocrud->fieldDataBinding("country", "country", "country_id", "country_name", "db"); //add data using another table name country $pdocrud->fieldTypes("education", "select"); //change education to select dropdown $pdocrud->fieldDataBinding("education", array("B.A.", "B.E.", "B.Ed.", "M.C.A.", "M.B.A."), "", "", "array"); //add data using array in select dropdown $pdocrud->fieldTypes("applying_for_position", "multiselect"); //change applying_for_position to multiselect dropdown $pdocrud->fieldDataBinding("applying_for_position", array("Manager", "Hr", "Developer", "Tester"), "", "", "array"); //add data using array in multiselect $pdocrud->fieldTypes("payment_method", "radio"); //change donation amount to radio button $pdocrud->fieldDataBinding("payment_method", array('', ''), "", "", "array"); //add data for radio button $pdocrud->fieldGroups("Name", array("first_name", "last_name")); $pdocrud->fieldGroups("billing1", array("billing_city", "billing_state")); $pdocrud->fieldGroups("billing2", array("billing_country", "billing_postal_code")); $pdocrud->fieldGroups("shipping1", array("shipping_city", "shipping_state")); $pdocrud->fieldGroups("shipping2", array("shipping_country", "shipping_postal_code")); $pdocrud->fieldHideLable("first_name"); // Hide label $pdocrud->fieldHideLable("last_name"); // Hide label $pdocrud->fieldHideLable("email"); // Hide label $pdocrud->fieldHideLable("contact_no"); // Hide label $pdocrud->fieldHideLable("billing_address_line_1"); // Hide label $pdocrud->fieldHideLable("billing_address_line_2"); // Hide label $pdocrud->fieldHideLable("billing_city"); // Hide label $pdocrud->fieldHideLable("billing_state"); // Hide label $pdocrud->fieldHideLable("billing_country"); // Hide label $pdocrud->fieldHideLable("billing_postal_code"); // Hide label $pdocrud->fieldHideLable("shipping_address_line_1"); // Hide label $pdocrud->fieldHideLable("shipping_address_line_2"); // Hide label $pdocrud->fieldHideLable("shipping_city"); // Hide label $pdocrud->fieldHideLable("shipping_state"); // Hide label $pdocrud->fieldHideLable("shipping_country"); // Hide label $pdocrud->fieldHideLable("shipping_postal_code"); // Hide label $pdocrud->buttonHide("cancel"); // Hide button $pdocrud->setLangData("save", "SUBMIT"); $pdocrud->fieldCssClass("first_name", array("form-first-name")); // add class $pdocrud->fieldCssClass("last_name", array("form-first-name")); // add class $pdocrud->fieldCssClass("email", array("form-first-name")); // add class $pdocrud->enqueueCss("font-awesome.min", "../assets/css/font-awesome/css/font-awesome.min.css"); $pdocrud->enqueueCss("form-elements", "../assets/css/form-elements.css"); $pdocrud->enqueueCss("signup", "../assets/css/signup-form.css"); $pdocrud->enqueueCss("style", "../assets/css/style.css"); echo $pdocrud->dbTable("orders")->render("insertform");