Tag Archives: group header


add_group_header(mixed $before_col, mixed $header) : $this

Add caption to a subgroup. This adds visual elements thats help users to better navigate the form


mixed $before_col
  • column name that caption goes BEFORE
mixed $header
  • caption

Add A Section Header

You can divid a form into multiple subsections each with different header text. Use add_group_header() for this purpose.

$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 -> set_placeholder('Title', 'official job title');
$dbForm -> add_group_header("EmployeeID", "Basic Info");
$dbForm -> add_group_header("Email", "Contact Info");
$dbForm -> display();

Sample Output:


Live demo