Team 3 Form changes Doctor Activities for Neb 1
Specific Folder FTP Upload / ftp-deploy (push) Successful in 42s Details

This commit is contained in:
Tanuja Pansare 2026-09-07 15:21:45 +05:30
parent 30d174ea31
commit 5052880a35
1 changed files with 124 additions and 42 deletions

View File

@ -53,8 +53,8 @@
{{-- <th>Team Name</th> --}}
<th>Type of meeting</th>
<th>Execution Date</th>
<th>Name of speaker</th>
<th>MSL Code</th>
<th>Speaker Name</th>
<th>Speaker MSL Code</th>
<th>No of Attendees</th>
</tr>
</thead>
@ -97,45 +97,114 @@
<input type="hidden" name="form_id" value="{{$form_id}}">
@csrf
@foreach($questions as $question)
@if(in_array($question->code, ['record_date','name_of_the_speaker','msl_code', 'attendence']))
{{-- Do not show execution-only fields in Add Plan --}}
@if(in_array($question->code, ['record_date', 'attendence']))
@continue
@endif
<div class="col-md-12 mb-2">
<label for="field-{{$question->code}}" class="form-label">{{$question->question}} {!!$question->required == 'yes' ? '<span class="text-danger">*</span>':''!!} </label>
<label for="field-{{$question->code}}" class="form-label">
@if($question->code == 'name_of_the_speaker')
Speaker Name
@elseif($question->code == 'msl_code')
Speaker MSL Code
@else
{{$question->question}}
@endif
{!!$question->required == 'yes' ? '<span class="text-danger">*</span>':''!!}
</label>
@switch($question->type)
@case('hidden')
<input type="{{$question->type}}" id="field-{{$question->code}}" name="{{$question->code}}" value="{{isset($question->value)?$question->value:''}}">
<input
type="{{$question->type}}"
id="field-{{$question->code}}"
name="{{$question->code}}"
value="{{isset($question->value)?$question->value:''}}">
@break
@case('text')
@case('email')
@case('tel')
@case('date')
<input type="{{$question->type}}" id="field-{{$question->code}}" name="{{$question->code}}" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}">
<input
type="{{$question->type}}"
id="field-{{$question->code}}"
name="{{$question->code}}"
class="form-control"
{{$question->required == 'yes'?'required':''}}
value="{{isset($question->value)?$question->value:''}}">
@break
@case('number')
<input type="{{$question->type}}" min="0" max="9999999999" step="1" id="field-{{$question->code}}" name="{{$question->code}}" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}">
<input
type="number"
min="0"
step="1"
id="field-{{$question->code}}"
name="{{$question->code}}"
class="form-control"
{{$question->required == 'yes'?'required':''}}
value="{{isset($question->value)?$question->value:0}}">
@break
@case('textarea')
<textarea id="field-{{$question->code}}" name="{{$question->code}}" class="form-control" {{$question->required == 'yes'?'required':'' }}>{{isset($question->value)?$question->value:''}}</textarea>
<textarea
id="field-{{$question->code}}"
name="{{$question->code}}"
class="form-control"
{{$question->required == 'yes'?'required':''}}>{{isset($question->value)?$question->value:''}}</textarea>
@break
@case('dropdown')
<select class="form-control" id="field-{{$question->code}}" name="{{$question->code}}" {{$question->required == 'yes'?'required':'' }}>
<select
class="form-control"
id="field-{{$question->code}}"
name="{{$question->code}}"
{{$question->required == 'yes'?'required':''}}>
<option value=""> -- Select -- </option>
@foreach($question->options as $option)
<option value="{{$option->value}}" {{isset($question->value) && $question->value == $option->value ? 'selected':''}}>{{$option->display}}</option>
<option
value="{{$option->value}}"
{{isset($question->value) && $question->value == $option->value ? 'selected':''}}>
{{$option->display}}
</option>
@endforeach
</select>
@break
@case('checkbox')
@foreach($question->options as $option)
<div class="form-check mb-2 form-check-primary">
<input class="form-check-input" type="checkbox" id="field-{{$question->code}}-{{$option->value}}" name="{{$question->code}}[]" value="{{$option->value}}" {{isset($question->value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}>
<label class="form-check-label" for="field-{{$question->code}}-{{$option->value}}">{{$option->display}}</label>
<input
class="form-check-input"
type="checkbox"
id="field-{{$question->code}}-{{$option->value}}"
name="{{$question->code}}[]"
value="{{$option->value}}"
{{isset($question->value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}>
<label
class="form-check-label"
for="field-{{$question->code}}-{{$option->value}}">
{{$option->display}}
</label>
</div>
@endforeach
@break
@endswitch
</div>
@endforeach
@if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
<div class="text-center d-grid mt-3">
@ -271,6 +340,19 @@
})
jQuery(document).ready(function($){
// Speaker Name - allow everything except digits
$('#field-name_of_the_speaker').on('input', function () {
this.value = this.value.replace(/[0-9]/g, '');
});
// Speaker MSL Code - allow everything except alphabets
$('#field-msl_code').on('input', function () {
this.value = this.value.replace(/[a-zA-Z]/g, '');
});
$('#field-tentative_attendees_count, #field-budget_required').on('input', function () {
// Allow only whole numbers
this.value = this.value.replace(/[^0-9]/g, '');
});
$('#report-form').on('submit', function(event){
event.preventDefault();
$("#pageloader").fadeIn();