I have input with date type and checkbox for job history. Every working period that is still running will select checkbox input. How to display the checkbox value to the input form and save it to the database?
Form Input
Code
<div class="form-group">
<label for="recipient-name" class="col-form-label">Tanggal Akhir Kerja</label>
<input type="date" class="form-control" name="f_tahunakhir" value="<?= set_value('f_tahunakhir');?>" autocomplete="off">
<input type="checkbox" class="ui-datepicker-current" name="current_date"> Sampai dengan saat ini
</div>
2
Answers
enter image description here
I think you are trying to capture job history information using date inputs and a checkbox to indicate if the job is still ongoing. When the checkbox is selected, you want to set the date input value to the current date you can achieve this using HTML, JavaScript, and PHP.