Titans - Ciphaler Form changes
This commit is contained in:
parent
f26cf8dfd8
commit
aa81e6e90f
|
|
@ -90,7 +90,10 @@
|
|||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
<option value="others">Others</option>
|
||||
<option value="others"
|
||||
{{ isset($question->value) && $question->value == 'others' ? 'selected' : '' }}>
|
||||
Others
|
||||
</option>
|
||||
@else
|
||||
@foreach ($question->options as $option)
|
||||
<option value="{{ $option->value }}" pcode="{{isset($option->contact->pcode)?$option->contact->pcode:''}}" msl_code="{{isset($option->contact->msl_code)?$option->contact->msl_code:''}}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
||||
|
|
@ -181,6 +184,12 @@
|
|||
<script src="{{asset('assets/libs/sweetalert2/sweetalert2.min.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
if($('#field-contact_id').val() === 'others'){
|
||||
$('#field-name_of_other_hcp,#field-p_code_of_other_hcp')
|
||||
.parent().show();
|
||||
|
||||
$('#field-msl_code').parent().hide();
|
||||
}
|
||||
var today = new Date().toISOString().split('T')[0];
|
||||
|
||||
$('#field-record_date').attr('max', today);
|
||||
|
|
@ -243,7 +252,7 @@
|
|||
$('#field-contact_id').change(function() {
|
||||
$('#field-speciality').val($('option:selected', this).attr('speciality'))
|
||||
})
|
||||
|
||||
|
||||
$('#field-contact_id').change(function() {
|
||||
$('#field-msl_code').val($('option:selected', this).attr('msl_code'))
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue