930 lines
68 KiB
PHP
930 lines
68 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => 'Form'])
|
|
@include('layouts.shared/head-css', ['mode' => $mode ?? '', 'demo' => $demo ?? ''])
|
|
<link href="{{ asset('assets/libs/sweetalert2/sweetalert2.min.css') }}" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<div id="pageloader">
|
|
<img src="http://cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.16.1/images/loader-large.gif" alt="processing..." />
|
|
</div>
|
|
|
|
<body class="loading">
|
|
<div class="account-pages">
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8 col-lg-6 col-xl-5 p-0">
|
|
<div class="card bg-pattern">
|
|
<div class="card-body p-3 row">
|
|
|
|
@if (Session::has('error'))
|
|
<div class="alert alert-danger">{{ Session::get('error') }}</div>
|
|
<br>
|
|
@endif
|
|
@if (session('success'))
|
|
<div class=" alert alert-success">{{ session('success') }}
|
|
</div>
|
|
<br>
|
|
@endif
|
|
<div class="col-8">
|
|
<h4 class="page-title">{{ $form->title }}</h4>
|
|
</div>
|
|
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes'))
|
|
<div class="col-4">
|
|
@if ($form->link_type == 'form')
|
|
<a href="/form/history" class="float-end pt-1">View History</a>
|
|
@else
|
|
<a href="{{ url()->previous() }}" class="float-end pt-1">Back</a>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
@if (isset($form->user_info))
|
|
<div class="col-12">
|
|
<h6>Submitted By: {{ $form->user_info->name }}</h6>
|
|
</div>
|
|
@endif
|
|
<form method="POST" action="/form/submit" id="report-form" enctype="multipart/form-data">
|
|
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
|
|
|
{{-- hysodew starts --}}
|
|
<input type="hidden" name="hysodew_rx_new_maxmoist_ajanta_pharma"
|
|
id="hysodew_rx_new_maxmoist_ajanta_pharma" value="">
|
|
<input type="hidden" name="hysodew_rx_soha_sun" id="hysodew_rx_soha_sun"
|
|
value="">
|
|
<input type="hidden" name="hysodew_rx_hyla_entod" id="hysodew_rx_hyla_entod"
|
|
value="">
|
|
<input type="hidden" name="hysodew_rx_lubimoist_mankind"
|
|
id="hysodew_rx_lubimoist_mankind" value="">
|
|
<input type="hidden" name="hysodew_rx_ipca_labs" id="hysodew_rx_ipca_labs"
|
|
value="">
|
|
|
|
<input type="hidden" name="competitor_1_hysodew_rx_other"
|
|
id="competitor_1_hysodew_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_hysodew_rx_other"
|
|
id="competitor_2_hysodew_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_hysodew_rx_other"
|
|
id="competitor_3_hysodew_rx_other" value="">
|
|
{{-- hysodew ends --}}
|
|
|
|
{{-- hydrakem starts --}}
|
|
<input type="hidden" name="hydrakem_rx_refresh_tears_allergan"
|
|
id="hydrakem_rx_refresh_tears_allergan" value="">
|
|
<input type="hidden" name="hydrakem_rx_lubrex_micro_labs"
|
|
id="hydrakem_rx_lubrex_micro_labs" value="">
|
|
<input type="hidden" name="hydrakem_rx_just_tears_sunways"
|
|
id="hydrakem_rx_just_tears_sunways" value="">
|
|
<input type="hidden" name="hydrakem_rx_tear_drop_sun" id="hydrakem_rx_tear_drop_sun"
|
|
value="">
|
|
<input type="hidden" name="hydrakem_rx_veldrop_alembic"
|
|
id="hydrakem_rx_veldrop_alembic" value="">
|
|
|
|
<input type="hidden" name="competitor_1_hydrakem_rx_other"
|
|
id="competitor_1_hydrakem_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_hydrakem_rx_other"
|
|
id="competitor_2_hydrakem_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_hydrakem_rx_other"
|
|
id="competitor_3_hydrakem_rx_other" value="">
|
|
{{-- hydrakem ends --}}
|
|
|
|
{{-- hydrakem max starts --}}
|
|
<input type="hidden" name="hydrakem_max_rx_refresh_liquigel_allergan"
|
|
id="hydrakem_max_rx_refresh_liquigel_allergan" value="">
|
|
<input type="hidden" name="hydrakem_max_rx_loctears_entod"
|
|
id="hydrakem_max_rx_loctears_entod" value="">
|
|
<input type="hidden" name="hydrakem_max_rx_flogel_ciple"
|
|
id="hydrakem_max_rx_flogel_ciple" value="">
|
|
<input type="hidden" name="hydrakem_max_rx_lubrex_micro_labs"
|
|
id="hydrakem_max_rx_lubrex_micro_labs" value="">
|
|
<input type="hidden" name="hydrakem_max_rx_veldrop_gel_alembic"
|
|
id="hydrakem_max_rx_veldrop_gel_alembic" value="">
|
|
|
|
<input type="hidden" name="competitor_1_hydrakem_max_rx_other"
|
|
id="competitor_1_hydrakem_max_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_hydrakem_max_rx_other"
|
|
id="competitor_2_hydrakem_max_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_hydrakem_max_rx_other"
|
|
id="competitor_3_hydrakem_max_rx_other" value="">
|
|
{{-- hydrakem max ends --}}
|
|
|
|
{{-- moxam starts --}}
|
|
<input type="hidden" name="moxam_rx_vigamox_nocartis_intl"
|
|
id="moxam_rx_vigamox_nocartis_intl" value="">
|
|
<input type="hidden" name="moxam_rx_moxicip_cipla" id="moxam_rx_moxicip_cipla"
|
|
value="">
|
|
<input type="hidden" name="moxam_rx_mahaflox_mankind" id="moxam_rx_mahaflox_mankind"
|
|
value="">
|
|
<input type="hidden" name="moxam_rx_milflox_sun" id="moxam_rx_milflox_sun"
|
|
value="">
|
|
<input type="hidden" name="moxam_rx_moxigram_micro_labs"
|
|
id="moxam_rx_moxigram_micro_labs" value="">
|
|
|
|
<input type="hidden" name="competitor_1_moxam_rx_other"
|
|
id="competitor_1_moxam_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_moxam_rx_other"
|
|
id="competitor_2_moxam_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_moxam_rx_other"
|
|
id="competitor_3_moxam_rx_other" value="">
|
|
{{-- moxam ends --}}
|
|
|
|
{{-- moxam d starts --}}
|
|
<input type="hidden" name="moxam_d_rx_vigadexa_nocartis_intl"
|
|
id="moxam_d_rx_vigadexa_nocartis_intl" value="">
|
|
<input type="hidden" name="moxam_d_rx_4_quin_d_entod" id="moxam_d_rx_4_quin_d_entod"
|
|
value="">
|
|
<input type="hidden" name="moxam_d_rx_mofloren_d_indoco"
|
|
id="moxam_d_rx_mofloren_d_indoco" value="">
|
|
<input type="hidden" name="moxam_d_rx_moxigram_dm_micro_labs"
|
|
id="moxam_d_rx_moxigram_dm_micro_labs" value="">
|
|
<input type="hidden" name="moxam_d_rx_moxisurge_d_ipca_labs"
|
|
id="moxam_d_rx_moxisurge_d_ipca_labs" value="">
|
|
|
|
<input type="hidden" name="competitor_1_moxam_d_rx_other"
|
|
id="competitor_1_moxam_d_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_moxam_d_rx_other"
|
|
id="competitor_2_moxam_d_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_moxam_d_rx_other"
|
|
id="competitor_3_moxam_d_rx_other" value="">
|
|
{{-- moxam d ends --}}
|
|
|
|
|
|
{{-- hysodew_liquigel starts --}}
|
|
<input type="hidden" name="hysodew_liquigel_maxmoist_ultra_ajanta" id="hysodew_liquigel_maxmoist_ultra_ajanta" value="">
|
|
<input type="hidden" name="hysodew_liquigel_softvisc_ultra_ajanta" id="hysodew_liquigel_softvisc_ultra_ajanta" value="">
|
|
<input type="hidden" name="hysodew_liquigel_i_soft_sentiss" id="hysodew_liquigel_i_soft_sentiss" value="">
|
|
|
|
<input type="hidden" name="competitor_1_hysodew_liquigel_rx_other"
|
|
id="competitor_1_hysodew_liquigel_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_hysodew_liquigel_rx_other"
|
|
id="competitor_2_hysodew_liquigel_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_hysodew_liquigel_rx_other"
|
|
id="competitor_3_hysodew_liquigel_rx_other" value="">
|
|
{{-- hysodew_liquigel ends --}}
|
|
|
|
{{-- travorite starts --}}
|
|
<input type="hidden" name="travorite_travatan_novartis" id="travorite_travatan_novartis" value="">
|
|
<input type="hidden" name="travorite_travisight_alembic" id="travorite_travisight_alembic" value="">
|
|
<input type="hidden" name="travorite_tovaxo_ajanta" id="travorite_tovaxo_ajanta" value="">
|
|
<input type="hidden" name="travorite_lupitros_z_lupin" id="travorite_lupitros_z_lupin" value="">
|
|
<input type="hidden" name="travorite_travo_micro" id="travorite_travo_micro" value="">
|
|
|
|
<input type="hidden" name="competitor_1_travorite_rx_other"
|
|
id="competitor_1_travorite_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_travorite_rx_other"
|
|
id="competitor_2_travorite_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_travorite_rx_other"
|
|
id="competitor_3_travorite_rx_other" value="">
|
|
{{-- travorite ends --}}
|
|
|
|
{{-- travorite_t starts --}}
|
|
<input type="hidden" name="travorite_t_travacom_novartis" id="travorite_t_travacom_novartis" value="">
|
|
<input type="hidden" name="travorite_t_tovaxo_t_ajanta" id="travorite_t_tovaxo_t_ajanta" value="">
|
|
<input type="hidden" name="travorite_t_lupitros_tz_lupin" id="travorite_t_lupitros_tz_lupin" value="">
|
|
<input type="hidden" name="travorite_t_travisight_t_alembic" id="travorite_t_travisight_t_alembic" value="">
|
|
<input type="hidden" name="travorite_t_t_bet_entod" id="travorite_t_t_bet_entod" value="">
|
|
|
|
<input type="hidden" name="competitor_1_travorite_t_rx_other"
|
|
id="competitor_1_travorite_t_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_travorite_t_rx_other"
|
|
id="competitor_2_travorite_t_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_travorite_t_rx_other"
|
|
id="competitor_3_travorite_t_rx_other" value="">
|
|
{{-- travorite_t ends --}}
|
|
|
|
{{-- bramolide_t starts --}}
|
|
<input type="hidden" name="bramolide_t_combigan_abbvie" id="bramolide_t_combigan_abbvie" value="">
|
|
<input type="hidden" name="bramolide_t_brimolol_sun" id="bramolide_t_brimolol_sun" value="">
|
|
<input type="hidden" name="bramolide_t_brimocom__cipla" id="bramolide_t_brimocom__cipla" value="">
|
|
<input type="hidden" name="bramolide_t_bidin_t_ajanta" id="bramolide_t_bidin_t_ajanta" value="">
|
|
<input type="hidden" name="bramolide_t_ab_press_entod" id="bramolide_t_ab_press_entod" value="">
|
|
|
|
<input type="hidden" name="competitor_1_bramolide_t_rx_other"
|
|
id="competitor_1_bramolide_t_rx_other" value="">
|
|
<input type="hidden" name="competitor_2_bramolide_t_rx_other"
|
|
id="competitor_2_bramolide_t_rx_other" value="">
|
|
<input type="hidden" name="competitor_3_bramolide_t_rx_other"
|
|
id="competitor_3_bramolide_t_rx_other" value="">
|
|
{{-- bramolide_t ends --}}
|
|
|
|
|
|
|
|
|
|
@csrf
|
|
@if ($id)
|
|
<input type="hidden" name="id" value="{{ $id }}">
|
|
@endif
|
|
@if (isset($form->manager_can_submit) && $form->manager_can_submit == true)
|
|
<div class="col-md-12 mb-2">
|
|
<label for="field-user_id" class="form-label"> Select User / Territory <span
|
|
class="text-danger">*</span> </label>
|
|
<select class="form-control" id="field-user_id" name="user_id" required>
|
|
<option value=""> -- Select -- </option>
|
|
@foreach ($form->users as $option)
|
|
<option value="{{ $option->value }}"
|
|
hierarchy="{{ $option->hierarchy_id }}"
|
|
{{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}>
|
|
{{ $option->display }}</option>
|
|
@endforeach
|
|
</select>
|
|
<input type="hidden" id="field-hierarchy_id" name="hierarchy_id"
|
|
value="">
|
|
</div>
|
|
@endif
|
|
|
|
@foreach ($questions as $question)
|
|
<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>
|
|
@switch($question->type)
|
|
@case('hidden')
|
|
<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 : '' }}">
|
|
@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 }}">
|
|
@break
|
|
|
|
@case('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' : '' }}>
|
|
<option value=""> -- Select -- </option>
|
|
@foreach ($question->options as $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>
|
|
</div>
|
|
@endforeach
|
|
@break
|
|
|
|
@case('file')
|
|
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes'))
|
|
<input type="file" id="field-{{ $question->code }}"
|
|
name="{{ $question->code }}" class="form-control" value=""
|
|
accept="image/jpg, image/jpeg, image/png"
|
|
{{ $question->required == 'yes' ? 'required' : '' }}>
|
|
@elseif(isset($question->value))
|
|
<img src="{{ $question->value }}" class="img-fluid">
|
|
@endif
|
|
@break
|
|
|
|
@case('multitextbox')
|
|
<div class="row">
|
|
{{-- @foreach ($question->options as $option)
|
|
<div class="col-6">{{$option->display}}</div>
|
|
<div class="col-6 mb-1">
|
|
<input type="number" id="field-{{$option->value}}" name="{{$option->value}}" class="form-control" required value="{{isset($option->val)?$option->val:0}}">
|
|
</div>
|
|
@endforeach --}}
|
|
|
|
<div style="width: auto; overflow-y: auto; overflow-x: auto;">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Brand</th>
|
|
<th>Rx ns</th>
|
|
<th>Competitor 1</th>
|
|
<th>Rx ns</th>
|
|
<th>Competitor 2</th>
|
|
<th>Rx ns</th>
|
|
<th>Competitor 3</th>
|
|
<th>Rx ns</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@php
|
|
$brandData = [
|
|
'hysodew_rx' => [
|
|
'slug' => ['brand_1' => 'new_maxmoist_ajanta_pharma', 'brand_2' => 'soha_sun', 'brand_3' => 'hyla_entod', 'brand_4' => 'lubimoist_mankind', 'brand_5' => 'ipca_labs', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'NEW MAXMOIST (AJANTA PHARMA)', 'brand_2_name' => 'SOHA (SUN*)', 'brand_3_name' => 'HYLA (ENTOD)', 'brand_4_name' => 'LUBIMOIST (MANKIND)', 'brand_5_name' => 'HYLOSURGE (IPCA LABS)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'hydrakem_rx' => [
|
|
'slug' => ['brand_1' => 'refresh_tears_allergan', 'brand_2' => 'lubrex_micro_labs', 'brand_3' => 'just_tears_sunways', 'brand_4' => 'tear_drop_sun', 'brand_5' => 'veldrop_alembic', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'REFRESH TEARS (ALLERGAN)', 'brand_2_name' => 'LUBREX (MICRO LABS*)', 'brand_3_name' => 'JUST TEARS (SUNWAYS)', 'brand_4_name' => 'TEAR DROPS (SUN*)', 'brand_5_name' => 'VELDROP (ALEMBIC)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'hydrakem_max_rx' => [
|
|
'slug' => ['brand_1' => 'refresh_liquigel_allergan', 'brand_2' => 'loctears_entod', 'brand_3' => 'flogel_ciple', 'brand_4' => 'lubrex_micro_labs', 'brand_5' => 'veldrop_gel_alembic', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'REFRESH LIQUIGEL (ALLERGAN)', 'brand_2_name' => 'LOCTEARS (ENTOD)', 'brand_3_name' => 'FLOGEL (CIPLA)', 'brand_4_name' => 'LUBREX (MICRO LABS*)', 'brand_5_name' => 'VELDROP GEL (ALEMBIC)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'moxam_rx' => [
|
|
'slug' => ['brand_1' => 'vigamox_nocartis_intl', 'brand_2' => 'moxicip_cipla', 'brand_3' => 'mahaflox_mankind', 'brand_4' => 'milflox_sun', 'brand_5' => 'moxigram_micro_labs', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'VIGAMOX (NOVARTIS INTL.*)', 'brand_2_name' => 'MOXICIP (CIPLA)', 'brand_3_name' => 'MAHAFLOX (MANKIND)', 'brand_4_name' => 'MILFLOX (SUN*)', 'brand_5_name' => 'MOXIGRAM (MICRO LABS*)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'moxam_d_rx' => [
|
|
'slug' => ['brand_1' => 'vigadexa_nocartis_intl', 'brand_2' => '4_quin_d_entod', 'brand_3' => 'mofloren_d_indoco', 'brand_4' => 'moxigram_dm_micro_labs', 'brand_5' => 'moxisurge_d_ipca_labs', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'VIGADEXA (NOVARTIS INTL.*)', 'brand_2_name' => '4 QUIN-D (ENTOD)', 'brand_3_name' => 'MOFLOREN-D (INDOCO*)', 'brand_4_name' => 'MOXIGRAM-DM (MICRO LABS*)', 'brand_5_name' => 'MOXISURGE-D (IPCA LABS)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'hysodew_liquigel_rx' => [
|
|
'slug' => ['brand_1' => 'maxmoist_ultra_ajanta', 'brand_2' => 'softvisc_ajanta', 'brand_3' => 'i_soft_sentiss', 'brand_4' => 'other' ,'brand_5' => '' ,'brand_6' => '' ],
|
|
'name' => ['brand_1_name' => 'MAXMOIST ULTRA (Ajanta)', 'brand_2_name' => 'SOFTVISC ULTRA (Ajanta)', 'brand_3_name' => 'I SOFT (Sentiss)', 'brand_4_name' => 'Other', 'brand_5_name' => '', 'brand_6_name' => ''],
|
|
],
|
|
'travorite_rx' => [
|
|
'slug' => ['brand_1' => 'travatan_novartis', 'brand_2' => 'travisight_alembic', 'brand_3' => 'tovaxo_ajanta', 'brand_4' => 'lupitros-z_lupin', 'brand_5' => 'travo_micro', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'TRAVATAN (Novartis)', 'brand_2_name' => 'TRAVISIGHT (Alembic)', 'brand_3_name' => 'TOVAXO (Ajanta)', 'brand_4_name' => 'LUPITROS-Z (Lupin)', 'brand_5_name' => 'TRAVO (Micro)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'travorite_t_rx' => [
|
|
'slug' => ['brand_1' => 'travacom_novartis', 'brand_2' => 'tovaxo_t_ajanta', 'brand_3' => 'lupitros_tz_lupin', 'brand_4' => 'travisight-t_alembic', 'brand_5' => 't-bet_entod', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'TRAVACOM (Novartis)', 'brand_2_name' => 'TOVAXO-T (Ajanta)', 'brand_3_name' => 'LUPITROS-TZ (Lupin)', 'brand_4_name' => 'TRAVISIGHT-T (Alembic)', 'brand_5_name' => 'T-BET (Entod)', 'brand_6_name' => 'Other'],
|
|
],
|
|
'bramolide_t_rx' => [
|
|
'slug' => ['brand_1' => 'combigan_abbvie', 'brand_2' => 'brimolol_sun', 'brand_3' => 'brimocom_cipla', 'brand_4' => 'bidin_t_ajanta', 'brand_5' => 'ab_press_entod', 'brand_6' => 'other'],
|
|
'name' => ['brand_1_name' => 'COMBIGAN (Abbvie)', 'brand_2_name' => 'BRIMOLOL (Sun)', 'brand_3_name' => 'BRIMOCOM- (Cipla)', 'brand_4_name' => 'BIDIN T (Ajanta)', 'brand_5_name' => 'AB PRESS (Entod)', 'brand_6_name' => 'Other'],
|
|
],
|
|
];
|
|
@endphp
|
|
|
|
@foreach ($question->options as $option)
|
|
<tr>
|
|
<td>{{ $option->display }}</td>
|
|
<td>
|
|
<input type="number"
|
|
id="field_{{ $option->value }}"
|
|
name="field_{{ $option->value }}"
|
|
class="form-control form-control-large"
|
|
required value="">
|
|
</td>
|
|
|
|
@php
|
|
$mainbrand_slug = [];
|
|
$mainbrand_name = [];
|
|
|
|
if (array_key_exists($option->value, $brandData)) {
|
|
$mainbrand_slug = $brandData[$option->value]['slug'];
|
|
$mainbrand_name = $brandData[$option->value]['name'];
|
|
}
|
|
@endphp
|
|
|
|
<td>
|
|
<select class="form-control form-control-large"
|
|
id="competitor_1_{{ $option->value }}_name"
|
|
name="competitor_1_{{ $option->value }}_name"
|
|
required>
|
|
<option value=""> -- Select -- </option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_1'] }}">
|
|
{{ $mainbrand_name['brand_1_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_2'] }}">
|
|
{{ $mainbrand_name['brand_2_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_3'] }}">
|
|
{{ $mainbrand_name['brand_3_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_4'] }}">
|
|
{{ $mainbrand_name['brand_4_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_5'] }}">
|
|
{{ $mainbrand_name['brand_5_name'] }}
|
|
</option>
|
|
<option
|
|
value="competitor_1_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}">
|
|
{{ $mainbrand_name['brand_6_name'] }}
|
|
</option>
|
|
</select>
|
|
<div class="form-group" style="padding-top: 2px">
|
|
<input type="text"
|
|
name="competitor_1_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}"
|
|
id="competitor_1_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}"
|
|
class="form-control pd-1"
|
|
placeholder="Enter Name" value="">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<input type="number"
|
|
id="competitor_1_{{ $option->value }}_rx_ns"
|
|
name="competitor_1_{{ $option->value }}_rx_ns"
|
|
class="form-control form-control-large"
|
|
required>
|
|
</td>
|
|
<td>
|
|
<select class="form-control form-control-large"
|
|
id="competitor_2_{{ $option->value }}_name"
|
|
name="competitor_2_{{ $option->value }}_name"
|
|
required>
|
|
<option value=""> -- Select -- </option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_1'] }}">
|
|
{{ $mainbrand_name['brand_1_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_2'] }}">
|
|
{{ $mainbrand_name['brand_2_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_3'] }}">
|
|
{{ $mainbrand_name['brand_3_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_4'] }}">
|
|
{{ $mainbrand_name['brand_4_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_5'] }}">
|
|
{{ $mainbrand_name['brand_5_name'] }}
|
|
</option>
|
|
<option
|
|
value="competitor_2_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}">
|
|
{{ $mainbrand_name['brand_6_name'] }}
|
|
</option>
|
|
</select>
|
|
<div class="form-group" style="padding-top: 2px">
|
|
<input type="text"
|
|
name="competitor_2_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}"
|
|
id="competitor_2_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}"
|
|
class="form-control pd-1"
|
|
placeholder="Enter Name" value="">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<input type="number"
|
|
id="competitor_2_{{ $option->value }}_rx_ns"
|
|
name="competitor_2_{{ $option->value }}_rx_ns"
|
|
class="form-control form-control-large"
|
|
required>
|
|
</td>
|
|
<td>
|
|
<select class="form-control form-control-large"
|
|
id="competitor_3_{{ $option->value }}_name"
|
|
name="competitor_3_{{ $option->value }}_name"
|
|
required>
|
|
<option value=""> -- Select -- </option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_1'] }}">
|
|
{{ $mainbrand_name['brand_1_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_2'] }}">
|
|
{{ $mainbrand_name['brand_2_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_3'] }}">
|
|
{{ $mainbrand_name['brand_3_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_4'] }}">
|
|
{{ $mainbrand_name['brand_4_name'] }}
|
|
</option>
|
|
<option
|
|
value="{{ $option->value }}_{{ $mainbrand_slug['brand_5'] }}">
|
|
{{ $mainbrand_name['brand_5_name'] }}
|
|
</option>
|
|
<option
|
|
value="competitor_3_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}">
|
|
{{ $mainbrand_name['brand_6_name'] }}
|
|
</option>
|
|
</select>
|
|
<div class="form-group" style="padding-top: 2px">
|
|
<input type="text"
|
|
name="competitor_3_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}"
|
|
id="competitor_3_{{ $option->value }}_{{ $mainbrand_slug['brand_6'] }}"
|
|
class="form-control pd-1"
|
|
placeholder="Enter Name" value="">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<input type="number"
|
|
id="competitor_3_{{ $option->value }}_rx_ns"
|
|
name="competitor_3_{{ $option->value }}_rx_ns"
|
|
class="form-control form-control-large"
|
|
required>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@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">
|
|
<button class="btn btn-primary" type="submit" id="submit-btn"> Submit
|
|
</button>
|
|
</div>
|
|
@endif
|
|
</form>
|
|
|
|
</div> <!-- end card-body -->
|
|
</div>
|
|
<!-- end card -->
|
|
|
|
<!-- end row -->
|
|
|
|
</div> <!-- end col -->
|
|
</div>
|
|
<!-- end row -->
|
|
</div>
|
|
<!-- end container -->
|
|
</div>
|
|
<!-- end page -->
|
|
<style type="text/css">
|
|
#pageloader {
|
|
background: rgba(255, 255, 255, 0.8);
|
|
display: none;
|
|
height: 100%;
|
|
position: fixed;
|
|
width: 100%;
|
|
z-index: 9999;
|
|
}
|
|
|
|
.form-control-large {
|
|
width: 150px;
|
|
/* Adjust this value to your preferred size */
|
|
}
|
|
|
|
#pageloader img {
|
|
left: 50%;
|
|
margin-left: -32px;
|
|
margin-top: -32px;
|
|
position: absolute;
|
|
top: 50%;
|
|
}
|
|
</style>
|
|
@include('layouts.shared/footer-script')
|
|
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
|
|
<script type="text/javascript">
|
|
jQuery(document).ready(function($) {
|
|
$('#field-user_id').change(function() {
|
|
let hierarchy = $('option:selected', this).attr('hierarchy');
|
|
$('#field-hierarchy_id').val(hierarchy)
|
|
event.preventDefault();
|
|
$.ajax({
|
|
type: "GET",
|
|
url: '/form/getdoctorlist?partition={{ $form->partition }}&hierarchy=' +
|
|
hierarchy,
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data) {
|
|
$("#pageloader").fadeOut();
|
|
$('#field-contact_id').html('')
|
|
$('#field-contact_id').append($("<option></option>").attr("value", '')
|
|
.text('-- Select --'));
|
|
for (let itm of data) {
|
|
$('#field-contact_id').append($("<option></option>").attr("value",
|
|
itm.value).text(itm.display));
|
|
}
|
|
},
|
|
});
|
|
|
|
console.log(hierarchy)
|
|
})
|
|
|
|
function setValuesofhysodew() {
|
|
var value = $('#competitor_1_hysodew_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_hysodew_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hysodew_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_hysodew_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hysodew_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_hysodew_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_hysodew_rx_other').val()
|
|
var selectedValue = $('#competitor_1_hysodew_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hysodew_rx_other').val()
|
|
var selectedValue = $('#competitor_2_hysodew_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hysodew_rx_other').val()
|
|
var selectedValue = $('#competitor_3_hysodew_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
|
|
}
|
|
|
|
function setValuesofhydrakem() {
|
|
var value = $('#competitor_1_hydrakem_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_hydrakem_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hydrakem_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_hydrakem_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hydrakem_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_hydrakem_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_hydrakem_rx_other').val()
|
|
var selectedValue = $('#competitor_1_hydrakem_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hydrakem_rx_other').val()
|
|
var selectedValue = $('#competitor_2_hydrakem_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hydrakem_rx_other').val()
|
|
var selectedValue = $('#competitor_3_hydrakem_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
}
|
|
|
|
function setValuesofhydrakemmax() {
|
|
var value = $('#competitor_1_hydrakem_max_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_hydrakem_max_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hydrakem_max_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_hydrakem_max_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hydrakem_max_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_hydrakem_max_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_hydrakem_max_rx_other').val()
|
|
var selectedValue = $('#competitor_1_hydrakem_max_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hydrakem_max_rx_other').val()
|
|
var selectedValue = $('#competitor_2_hydrakem_max_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hydrakem_max_rx_other').val()
|
|
var selectedValue = $('#competitor_3_hydrakem_max_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
}
|
|
|
|
function setValuesofmoxam() {
|
|
var value = $('#competitor_1_moxam_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_moxam_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_moxam_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_moxam_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_moxam_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_moxam_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_moxam_rx_other').val()
|
|
var selectedValue = $('#competitor_1_moxam_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_moxam_rx_other').val()
|
|
var selectedValue = $('#competitor_2_moxam_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_moxam_rx_other').val()
|
|
var selectedValue = $('#competitor_3_moxam_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
}
|
|
|
|
function setValuesofmoxamd() {
|
|
var value = $('#competitor_1_moxam_d_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_moxam_d_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_moxam_d_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_moxam_d_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_moxam_d_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_moxam_d_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_moxam_d_rx_other').val()
|
|
var selectedValue = $('#competitor_1_moxam_d_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_moxam_d_rx_other').val()
|
|
var selectedValue = $('#competitor_2_moxam_d_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_moxam_d_rx_other').val()
|
|
var selectedValue = $('#competitor_3_moxam_d_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
}
|
|
|
|
function setValuesofhysodewliquigel() {
|
|
var value = $('#competitor_1_hysodew_liquigel_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_hysodew_liquigel_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hysodew_liquigel_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_hysodew_liquigel_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hysodew_liquigel_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_hysodew_liquigel_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_hysodew_liquigel_rx_other').val()
|
|
var selectedValue = $('#competitor_1_hysodew_liquigel_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_hysodew_liquigel_rx_other').val()
|
|
var selectedValue = $('#competitor_2_hysodew_liquigel_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_hysodew_liquigel_rx_other').val()
|
|
var selectedValue = $('#competitor_3_hysodew_liquigel_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
}
|
|
function setValuesoftravorite() {
|
|
var value = $('#competitor_1_travorite_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_travorite_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_travorite_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_travorite_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_travorite_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_travorite_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_travorite_rx_other').val()
|
|
var selectedValue = $('#competitor_1_travorite_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_travorite_rx_other').val()
|
|
var selectedValue = $('#competitor_2_travorite_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_travorite_rx_other').val()
|
|
var selectedValue = $('#competitor_3_travorite_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
}
|
|
function setValuesoftravoritet() {
|
|
var value = $('#competitor_1_travorite_t_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_travorite_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_travorite_t_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_travorite_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_travorite_t_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_travorite_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_travorite_t_rx_other').val()
|
|
var selectedValue = $('#competitor_1_travorite_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_travorite_t_rx_other').val()
|
|
var selectedValue = $('#competitor_2_travorite_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_travorite_t_rx_other').val()
|
|
var selectedValue = $('#competitor_3_travorite_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
}
|
|
function setValuesofbramolide() {
|
|
var value = $('#competitor_1_bramolide_t_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_1_bramolide_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_bramolide_t_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_2_bramolide_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_bramolide_t_rx_rx_ns').val()
|
|
var selectedValue = $('#competitor_3_bramolide_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_1_bramolide_t_rx_other').val()
|
|
var selectedValue = $('#competitor_1_bramolide_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_2_bramolide_t_rx_other').val()
|
|
var selectedValue = $('#competitor_2_bramolide_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
|
|
var value = $('#competitor_3_bramolide_t_rx_other').val()
|
|
var selectedValue = $('#competitor_3_bramolide_t_rx_name').find(':selected').val();
|
|
$('#' + selectedValue).val(value)
|
|
}
|
|
|
|
var otherBoxes = ['competitor_1_hysodew_rx_other', 'competitor_2_hysodew_rx_other', 'competitor_3_hysodew_rx_other',
|
|
'competitor_1_hydrakem_rx_other', 'competitor_2_hydrakem_rx_other', 'competitor_3_hydrakem_rx_other',
|
|
'competitor_1_hydrakem_max_rx_other', 'competitor_2_hydrakem_max_rx_other', 'competitor_3_hydrakem_max_rx_other',
|
|
'competitor_1_moxam_rx_other', 'competitor_2_moxam_rx_other', 'competitor_3_moxam_rx_other',
|
|
'competitor_1_moxam_d_rx_other', 'competitor_2_moxam_d_rx_other', 'competitor_3_moxam_d_rx_other',
|
|
|
|
'competitor_1_hysodew_liquigel_rx_other', 'competitor_2_hysodew_liquigel_rx_other', 'competitor_3_hysodew_liquigel_rx_other',
|
|
'competitor_1_travorite_rx_other', 'competitor_2_travorite_rx_other', 'competitor_3_travorite_rx_other',
|
|
'competitor_1_travorite_t_rx_other', 'competitor_2_travorite_t_rx_other', 'competitor_3_travorite_t_rx_other',
|
|
'competitor_1_bramolide_t_rx_other', 'competitor_2_bramolide_t_rx_other', 'competitor_3_bramolide_t_rx_other',
|
|
]
|
|
for (var i = 0; i < otherBoxes.length; i++) {
|
|
// console.log('#' + otherBoxes[i]);
|
|
$('[name='+otherBoxes[i]+']').hide();
|
|
}
|
|
|
|
$('#competitor_1_hysodew_rx_name, #competitor_2_hysodew_rx_name, #competitor_3_hysodew_rx_name, #competitor_1_hydrakem_rx_name, #competitor_2_hydrakem_rx_name, #competitor_3_hydrakem_rx_name, #competitor_1_hydrakem_max_rx_name, #competitor_2_hydrakem_max_rx_name,#competitor_3_hydrakem_max_rx_name, #competitor_1_moxam_rx_name, #competitor_2_moxam_rx_name, #competitor_3_moxam_rx_name, #competitor_1_moxam_d_rx_name, #competitor_2_moxam_d_rx_name, #competitor_3_moxam_d_rx_name, #competitor_1_hysodew_liquigel_rx_name, #competitor_2_hysodew_liquigel_rx_name, #competitor_3_hysodew_liquigel_rx_name, #competitor_1_travorite_rx_name, #competitor_2_travorite_rx_name, #competitor_3_travorite_rx_name, #competitor_1_travorite_t_rx_name, #competitor_2_travorite_t_rx_name, #competitor_3_travorite_t_rx_name, #competitor_1_bramolide_t_rx_name, #competitor_2_bramolide_t_rx_name, #competitor_3_bramolide_t_rx_name')
|
|
.on('change', function() {
|
|
var otherBoxes = ['competitor_1_hysodew_rx_other', 'competitor_2_hysodew_rx_other', 'competitor_3_hysodew_rx_other', 'competitor_1_hydrakem_rx_other', 'competitor_2_hydrakem_rx_other', 'competitor_3_hydrakem_rx_other', 'competitor_1_hydrakem_max_rx_other', 'competitor_2_hydrakem_max_rx_other', 'competitor_3_hydrakem_max_rx_other', 'competitor_1_moxam_rx_other', 'competitor_2_moxam_rx_other', 'competitor_3_moxam_rx_other', 'competitor_1_moxam_d_rx_other', 'competitor_2_moxam_d_rx_other', 'competitor_3_moxam_d_rx_other', 'competitor_1_hysodew_liquigel_rx_other', 'competitor_2_hysodew_liquigel_rx_other', 'competitor_3_hysodew_liquigel_rx_other', 'competitor_1_travorite_rx_other', 'competitor_2_travorite_rx_other', 'competitor_3_travorite_rx_other', 'competitor_1_travorite_t_rx_other', 'competitor_2_travorite_t_rx_other', 'competitor_3_travorite_t_rx_other', 'competitor_1_bramolide_t_rx_other', 'competitor_2_bramolide_t_rx_other', 'competitor_3_bramolide_t_rx_other' ]
|
|
var selectedValue = $(this).find(':selected').val();
|
|
|
|
var name = $(this).attr('name');
|
|
var replacedName = name.replace('_name', '_other');
|
|
|
|
console.log(name)
|
|
if (otherBoxes.includes(selectedValue)) {
|
|
$('[name='+selectedValue+']').show();
|
|
}else{
|
|
$('[name='+replacedName+']').hide();
|
|
}
|
|
|
|
})
|
|
|
|
|
|
$('#report-form').on('submit', function(event) {
|
|
event.preventDefault();
|
|
$("#pageloader").fadeIn();
|
|
setValuesofhysodew()
|
|
setValuesofhydrakem()
|
|
setValuesofhydrakemmax()
|
|
setValuesofmoxam()
|
|
setValuesofmoxamd()
|
|
|
|
setValuesofhysodewliquigel()
|
|
setValuesoftravorite()
|
|
setValuesoftravoritet()
|
|
setValuesofbramolide()
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/form/ajaxsubmit',
|
|
data: new FormData($('#report-form')[0]),
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data) {
|
|
$("#pageloader").fadeOut();
|
|
if (data.status == 'success') {
|
|
Swal.fire({
|
|
title: 'Great!',
|
|
text: 'Your data is successfully submitted!',
|
|
icon: 'success'
|
|
})
|
|
$('#report-form').trigger("reset");
|
|
} else {
|
|
Swal.fire({
|
|
icon: 'error',
|
|
title: 'Data not submitted',
|
|
text: 'Something went wrong, please try again after some time!'
|
|
})
|
|
}
|
|
},
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|