Hide Fields - Multiple
Logic Value NEW

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
1Firrelli2Jox9273asdjo.firrelli2@myoffice.comLondon View Edit Remove
2Patterson123x4645wpatterson@classicmodelca.comLondon View Edit Remove
3BondurGerard2x540gbondur@classicmodelcars.comNYC View Edit Remove
4BowAnthony8x5428abow@classicmodelcars.comSan Francisco View Edit Remove
5JenningsLesliex540ljennings@classicmodelcars.comTokyo View Edit Remove
6ThompsonLesliex4065lthompson@classicmodelcars.comSan Francisco View Edit Remove
7FirrelliJuliex2173jfirrelli@classicmodelcars.comBoston View Edit Remove
8PattersonStevex4334spatterson@classicmodelcars.comBoston View Edit Remove
9TsengFoon Yueo224ftseng@classicmodelcars.com View Edit Remove
10VanaufGeorge Nx4102gvanauf@classicmodelcars.comNYC View Edit Remove
Search