Hide Fields - Multiple
Logic Value 1.7.25.1 Bootstrap 4.5 theme
Hide fields based on multiple inputs or multiple selected logic. For this instance selecting only 3 "Offices" will hide extension
HIDE CODE
<?php // Get an instance of the Xcrud class $xcrud = Xcrud::get_instance(); // Set the table to work with $xcrud->table("employees"); // Define which columns to display in the table $xcrud->columns("lastName,firstName,extension,email,officeCode"); // Define which fields are available for data entry or editing $xcrud->fields("lastName,firstName,extension,email,officeCode"); $xcrud->relation("officeCode","offices","officeCode","city"); // Hide the 'extension' field when the 'officeCode' IN '7,3,4'(London, NYC, Paris) $xcrud->hide_logic("extension","officeCode","IN","7,3,4"); // Render the xcrud instance to display the table and form echo $xcrud->render(); ?>
Employees
# | Lastname | Firstname | Extension | Officecode | ||
---|---|---|---|---|---|---|
1 | Tseng | Foon Yue | o224 | ftseng@classicmodelcars.com | View Edit Remove | |
2 | Vanauf | George N | x4103 | gvanauf@classicmodelcars.com | NYC | View Edit Remove |
3 | Bondur | Loui | x6496 | lbondur@classicmodelcars.com | Paris | View Edit Remove |
4 | Hernandez | Gerardo | x2028 | gerard.hernandez@myoffice.com | London | View Edit Remove |
5 | Castillo | Pamela | x2759 | pcastillo@classicmodelcars.com | Paris | View Edit Remove |
6 | Bott | Larry | x2311 | lbott@classicmodelcars.com | London | View Edit Remove |
7 | Fixter | Andy | x101 | afixter@classicmodelcars.com | Sydney | View Edit Remove |
8 | Marsh | Peter | x102 | pmarsh@classicmodelcars.com | Sydney | View Edit Remove |
9 | King | Tom | x103 | tking@classicmodelcars.com | Sydney | View Edit Remove |
10 | Nishi | Mami | x101 | mnishi@classicmodelcars.com | View Edit Remove |