hello
Please help write the code and its location
Hide radio and field
Coding:
CREATE TABLE IF NOT EXISTS tyep_diagnostic_noor (
id int(11) NOT NULL AUTO_INCREMENT,
Diagnostic_noor varchar(255) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;table
CREATE TABLE IF NOT EXISTS visit3 (
id int(11) NOT NULL AUTO_INCREMENT,
Identity bigint(11) NOT NULL,
sex int(11) NOT NULL,
alraqm_alwizariu int(11) NOT NULL,
almaktab int(11) NOT NULL,
Diagnostic_noor int(11) NOT NULL,
shrine_teacher varchar(255) DEFAULT NULL,
madat_alziyara varchar(255) NOT NULL,
Class varchar(255) NOT NULL,
Degree float NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;Diagnostic_noor Hide radio
field (Diagnostic_noor) The entered value 1or 2
If he field (Diagnostic_noor) chooses 1, the rest of the fields disappear
The fields that disappear:
shrine_teacher varchar(255) DEFAULT NULL,
madat_alziyara varchar(255) NOT NULL,
Class varchar(255) NOT NULL,
Degree float NOT NULL,
If he field(Diagnostic_noor) chooses 2, the rest of the fields will open
The fields that appear
shrine_teacher varchar(255) DEFAULT NULL,
madat_alziyara varchar(255) NOT NULL,
Class varchar(255) NOT NULL,
Degree float NOT NULL,
This code works … but the field labels have not disappearedIt only works in this link
visit3add.php?showmaster=visit&fk_sex=1&fk_Identity=22233&fk_almaktab=1&fk_alraqm_alwizariu=4444How do I make it work on this link ?
visitedit.php?showdetail=visit2,visit3&id=2// Write your table-specific startup script here
// console.log(“page loaded”);
$(document).ready(function(){
$(“#x_shrine_teacher”).hide();
$(“#x_madat_alziyara”).hide();
$(“#x_alsafu”).hide();
$(“#x_Degree”).hide();
$(“input[name=‘x_Diagnostic_noor’]”).click(function() {
if (this.value == “1”) {
$(“#x_shrine_teacher”).show();
$(“#x_madat_alziyara”).show();
$(“#x_alsafu”).show();
$(“#x_Degree”).show();
} else {
$(“#x_shrine_teacher”).hide();
$(“#x_madat_alziyara”).hide();
$(“#x_alsafu”).hide();
$(“#x_Degree”).hide();
}
});
});
- If v2020, you may remove the enclosing “$(document).ready(function(){” and “});”.
- If detail table in Master/Detail-Edit, there are more than one records in the detail grid, you cannot use “#x_fieldname”, the ids contain index, you should select by the “data-table” and “data-field” attributes. Right click the element in your browser (Chrome) and select inspect to check the HTML of the element.
This code worked thank you
I had an error adding the barcode … I removed the barcode and turned on// Write your global startup script here
// console.log(“page loaded”);$(document).ready(function(){
$(“#r_shrine_teacher”).hide();
$(“#r_madat_alziyara”).hide();
$(“#r_alsafu”).hide();
$(“#r_Degree”).hide();
$(“#x_Diagnostic_noor”).change(function() {
var str = $(“option:selected”, this);
if (this.value == “1”) {
$(“#r_shrine_teacher”).show();
$(“#r_madat_alziyara”).show();
$(“#r_alsafu”).show();
$(“#r_Degree”).show();
} else {
$(“#r_shrine_teacher”).hide();
$(“#r_madat_alziyara”).hide();
$(“#r_alsafu”).hide();
$(“#r_Degree”).hide();
}
});
});
@salehAt which position u r using this code ?
zunair wrote:
@salehAt which position u r using this code ?In addition : startup script
Client Scripts /table-specific/add/copy page/ startup scriptin Edit : startup script
Client Scripts /table-specific/Edit Page/ startup script