Team 3 ( Revesmart Launch Drive (Neb Arise)) - Metric Code
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m33s Details

This commit is contained in:
zeeshan 2026-11-20 14:52:51 +05:30
parent 17c300d8d3
commit ae3d2aadea
1 changed files with 16 additions and 0 deletions

View File

@ -336,10 +336,26 @@
}
})
$('#field-sample_given_to_doctor').on('change',function(){
let value=$(this).val();
if(value==='Yes'){
$('#field-no_of_boxes_given').parent().show();
$('#field-no_of_boxes_given').attr('required',true);
}
else{
$('#field-no_of_boxes_given').parent().hide();
$('#field-no_of_boxes_given').attr('required',false);
}
})
$('#report-form').on('submit', function(event){
event.preventDefault();
if($('#field-sample_given_to_doctor').val()==='Yes'){
$('#report-form').append("<input type='hidden' name='sample_given' value='1' />");
}
const formData = new FormData($('#report-form')[0]);
// Log form data to console
for (let [key, value] of formData.entries()) {