Hide A Form Element

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

No related content found.