hide element – PHP Database Form https://phpdatabaseform.com Generate web form from database. Simple. Fri, 26 Dec 2014 16:02:27 +0000 en-US hourly 1 https://wordpress.org/?v=7.0.4 Hide A Form Element https://phpdatabaseform.com/examples/hide-a-form-element/ Sun, 06 Jul 2014 00:47:44 +0000 http://phpdatabaseform.com/?p=296 You can choose to hide certain fields from displayed on the form with set_hide() method.

Note set_hide() method hides the form elements using display:none in CSS. You should not use it to hide sensitive information such as password.

$dbForm = new C_DatabaseForm("SELECT * FROM Employees", "EmployeeID", "Employees");
$dbForm -> set_label("EmployeeID", "Employee ID");
$dbForm -> set_label("LastName", "Last Name");
$dbForm -> set_label("FirstName", "First Name");
$dbForm -> set_label("BirthDay", "DOB");
$dbForm -> set_hide("Extension");
$dbForm -> set_hide("hireDate");
$dbForm -> display();

Live demo

]]>