|
@@ -26,6 +26,21 @@ $fields = [
|
|
|
]
|
|
|
];
|
|
|
|
|
|
+$customFields = [
|
|
|
+ [
|
|
|
+ ":::Anxiety disorder|BPH|carpal tunnel|CHF|Degernative Disc Disorder|Fibromyalgia",
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ ":::Hard of Hearing|Hearing Impairment|Lupus|Multiple Falls|Multiple kidney stones|Multiple Rib Fractures",
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ ":::Neuropathy|Obesity|Obstructive Sleep Apnea|Primary immunodeficiency diso|pulmonary hypertension|Restless Leg Syndrome",
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ ":::Rhinitis|Russell Silver Syndrome|transverse myelitis|Vertigo",
|
|
|
+ ]
|
|
|
+];
|
|
|
+
|
|
|
$contentData = false;
|
|
|
if($section){
|
|
|
$contentData = json_decode($section->content_data, true);
|
|
@@ -47,6 +62,20 @@ for ($i = 0; $i < count($fields); $i++) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+for ($i = 0; $i < count($customFields); $i++) {
|
|
|
+ for($j = 0; $j < count($customFields[$i]); $j++) {
|
|
|
+ $parts = explode(":::", $customFields[$i][$j]);
|
|
|
+ $head = 'custom';
|
|
|
+ if(!empty($parts[0])) $head = $parts[0];
|
|
|
+ $values = explode("|", $parts[1]);
|
|
|
+ for($k = 0; $k < count($values); $k++) {
|
|
|
+ $fName = $head . '_' . sanitize_field_name($values[$k]);
|
|
|
+ if(!isset($contentData[$fName])) {
|
|
|
+ $contentData[$fName] = '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
$formID = rand(0, 100000);
|
|
|
?>
|
|
@@ -108,6 +137,37 @@ $formID = rand(0, 100000);
|
|
|
@endfor
|
|
|
</div>
|
|
|
|
|
|
+ <div class="font-weight-bold mb-2">Custom Items</div>
|
|
|
+
|
|
|
+ <div class="row">
|
|
|
+ @for ($i = 0; $i < count($customFields); $i++)
|
|
|
+ <div class="col-md-3">
|
|
|
+ @for($j = 0; $j < count($customFields[$i]); $j++)
|
|
|
+ <?php
|
|
|
+ $parts = explode(":::", $customFields[$i][$j]);
|
|
|
+ $head = 'custom';
|
|
|
+ if(!empty($parts[0])) $head = $parts[0];
|
|
|
+ $values = explode("|", $parts[1]);
|
|
|
+ ?>
|
|
|
+ <div class="mb-3">
|
|
|
+ @if($head !== 'custom')
|
|
|
+ <div class="font-weight-bold mb-2">{{ $head }}</div>
|
|
|
+ @endif
|
|
|
+ @for($k = 0; $k < count($values); $k++)
|
|
|
+ <?php
|
|
|
+ $fName = $head . '_' . sanitize_field_name($values[$k]);
|
|
|
+ ?>
|
|
|
+ <label class="d-flex align-items-center mb-1">
|
|
|
+ <input type="checkbox" name="{{ $fName }}" {{ $contentData[$fName] ? 'checked' : '' }} class="m-0">
|
|
|
+ <span class="ml-2">{{ $values[$k] }}</span>
|
|
|
+ </label>
|
|
|
+ @endfor
|
|
|
+ </div>
|
|
|
+ @endfor
|
|
|
+ </div>
|
|
|
+ @endfor
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="row mb-3">
|
|
|
<div class="col-12">
|
|
|
<textarea rte type="text" class="form-control form-control-sm p-2"
|