I need to hide a value from the dropdown encoding table
DROP TABLE IF EXISTS `typr_receipt`;
CREATE TABLE IF NOT EXISTS `typr_receipt` (
`receipt_id` int(11) NOT NULL,
`receipt` varchar(255) NOT NULL,
PRIMARY KEY (`receipt_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `abtidayiy`;
CREATE TABLE IF NOT EXISTS `abtidayiy` (
`SchoolID` varchar(255) NOT NULL,
`SectID` varchar(255) DEFAULT NULL,
`School_name` varchar(255) DEFAULT NULL,
`nawe_almadrasa` varchar(255) DEFAULT NULL,
`Number_students` int(11) DEFAULT NULL,
`Number_seasons` longtext,
`SchSharingNum` int(11) DEFAULT NULL,
`GENDER` varchar(255) DEFAULT NULL,
`Stage` varchar(255) DEFAULT NULL,
`tasnif_almadrasa` varchar(255) DEFAULT NULL,
`nizam_aldirasa` varchar(255) DEFAULT NULL,
`nawe_altaelim` varchar(255) DEFAULT NULL,
`alsaf_1` int(11) NOT NULL,
`alsaf_2` int(11) NOT NULL,
`alsaf_3` int(11) NOT NULL,
`alsaf_4` int(11) NOT NULL,
`alsaf_5` int(11) NOT NULL,
`alsaf_6` int(11) NOT NULL,
`receipt` int(11) NOT NULL,
`store` int(11) NOT NULL DEFAULT '1',
`alsaf1` int(11) NOT NULL,
`alsaf2` int(11) NOT NULL,
`alsaf3` int(11) NOT NULL,
`alsaf4` int(11) NOT NULL,
`alsaf5` int(11) NOT NULL,
`alsaf6` int(11) NOT NULL,
PRIMARY KEY (`SchoolID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Here I hide the entire field,
// Write your table-specific startup script here, no need to add script tags.
// Write your table-specific startup script here
// console.log("page loaded");
$(document).ready(function(){
$("#r_receipt").hide();
//Hide fields according to numbers 11,12,13 Other than that it shows all
$("#x_receipt").change(function() {
var str = $("option:selected", this);
if (this.value == "3") {
$("#r_receipt").show();
} else {
$("#r_receipt").hide();
}
});
});
but I want to hide a value only receipt_id by using a condition :
if (CurrentUserLevel() ==1){}