<?php
/*
lets suposse you have this folder tree
yourproject/
vendors/
lib_1/
lib_n/
theframework/ -->uncompressed zip
helpers/
index.php
*/
//this file is: yourproject/index.php
include_once("vendors/theframework/helpers/autoload.php");
use TheFramework\Helpers\HelperInputText;
$oInput = new HelperInputText();
$oInput->set_value("Hello World");
$oInput->add_class("form-control");
$oInput->show();
It helps to create html element "input type password":
<input type="password" value="some password">
<?php
use TheFramework\Helpers\HelperInputPassword;
use TheFramework\Helpers\HelperButtonBasic;
use TheFramework\Helpers\HelperForm;
if(isset($_POST["passOne"]))//required
//pr(): is an echo function
pr("{_POST[passOne]:{$_POST["passOne"]}, _POST[passTwo]:{$_POST["passTwo"]}}","\$_POST");
$oPass = new HelperInputPassword();
$oPass->set_id("passOne");
$oPass->set_name("passOne");
$oPass->add_extras("placeholder","Your password");
$oPass->set_value((isset($_POST["passOne"])?$_POST["passOne"]:NULL));
$oPassConf = new HelperInputPassword();
$oPassConf->set_id("passTwo");
$oPassConf->set_name("passTwo");
$oPassConf->add_extras("placeholder","Confirm your password");
$oPassConf->set_value((isset($_POST["passTwo"])?$_POST["passTwo"]:NULL));
$oButton = new HelperButtonBasic();
$oButton->set_type("submit");
$oButton->add_class("btn btn-primary");
$oButton->add_extras("autofocus","autofocus");
$oButton->set_innerhtml("Submit");
$oForm = new HelperForm();
$oForm->set_id("myForm");
//$oForm->set_action("/index.php");
$oForm->set_method("post");
$oForm->add_style("border:1px dashed #4f9fcf;");
$oForm->add_style("padding:5px;");
$oForm->add_inner_object($oPass);
$oForm->add_inner_object($oPassConf);
$oForm->add_inner_object($oButton);
//$oForm->add_inner_object(new TheFramework\Helpers\HelperRaw(" <input type=\"reset\" class=\"btn btn-primary\">"));
$oForm->show();
?>
<form id="myForm" method="post" style="border:1px dashed #4f9fcf;;padding:5px;"> <input type="password" id="passOne" name="passOne" maxlength="50" placeholder="Your password"> <input type="password" id="passTwo" name="passTwo" maxlength="50" placeholder="Confirm your password"> <button type="submit" class="btn btn-primary" autofocus="autofocus"> Submit</button> </form>