Posts

Showing posts from 2020

Enable and Disable Input Fields on Selecting value from Dropdown

Dropdown Dependant <input> Field  using jQuery <select class="form-control" id='rilmavn' name="cntrilm-for" required="" disabled> <option value="None">Select</option> <option value="Asha Kiran">Asha Kiran</option> <option value="Others">Others</option> </select> <script> $('#rilmavn').change(function() { if( $(this).val() == 'None') { $('#cntrilm-ashakirans').prop( "disabled", true ); } else {        $('#cntrilm-ashakirans').prop( "disabled", false ); } }); </script> <input class="form-control" type="text" value="" name="cntrilm-ashakirans" id="cntrilm-ashakirans" placeholder="No. of Asha Kirans/Others" disabled>

HTML5 Form with JQuery Repeater, Bootstrap and Multi-Dimensional Array

<?php if($_SERVER['REQUEST_METHOD'] == "POST"){ $sql1 = "INSERT INTO clbmeetings (`clbid`, `meeting_date`, `speaker`, `subject`, `attendance_percent`, `ri_year`, `created_by`, `ip`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";   $stmt1 = mysqli_prepare($conn, $sql1);     if($stmt1){ mysqli_stmt_bind_param($stmt1, "ssssssss", $param_clbid, $param_meeting_date, $param_speaker, $param_subject, $param_attendance_percent, $param_ri_year, $param_created_by, $param_ip);          //Set These Parameters          foreach ($_POST['meet'] as $item) {             if(empty($item['mtdt'])){             echo 'Empty Array';             }     else{                  $meeting_date = $item['mtdt'];                  $speaker = $item['speaker'];                  $subject = $item['subject'];                  $attendance_percent = $item['atpercent'];                  $param_meeting_date= $meeting_d

Adding search functionality in select options using Select2 and Bootstrap

Sample Dropdown using Select2 <link href="base/assets/js/select2/select2.min.css" rel="stylesheet" /> <link href="base/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> <select class="select2 form-control mb-3 custom-select" style="width: 100%; height:36px;" id="prgcat-list" name="prgcat-list"> <option hidden disabled selected value>Choose Category</option> <option value='1'>Region</option> <option value='2'>Zone</option> <option value='3'>Club</option> <option value='4'>Category</option> </select> <script src="base/assets/js/select2/select2.min.js"></script> <script> $("#prgcat-list").select2({ allowClear:true, placeholder: 'prgcat-list' }); </script> CDN Links for files: https://cdnjs.c