DEMO SITE v1.7.26

Hide Fields - Multiple
Logic Value NEW 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

#LastnameFirstnameExtensionEmailOfficecode
Actions
1MurphyDianex5800dmurphy@classicmodelcars.comTokyo View Edit Remove
2PattersonMar'yx4611mpatterso@classicmodelcars.comSan Francisco View Edit Remove
3FirrelliJeffx9273jfirrelli@classicmodelcars.comSan Francisco View Edit Remove
4PattersonWilliamx4871wpatterson@classicmodelcars.comLondon View Edit Remove
5BondurGerardx5408gbondur@classicmodelcars.comParis View Edit Remove
6BowAnthonyx5428abow@classicmodelcars.comSan Francisco View Edit Remove
7JenningsLesliex3291ljennings@classicmodelcars.comSan Francisco View Edit Remove
8ThompsonLesliex4065lthompson@classicmodelcars.comSan Francisco View Edit Remove
9FirrelliJuliex2173jfirrelli@classicmodelcars.comBoston View Edit Remove
10PattersonStevex4334spatterson@classicmodelcars.comBoston View Edit Remove
Search Execution time: 0.003 sMemory usage: 0.18 MB