@props(['demographyconfigId','moduleid','mandatory']) @php $Field=DB::table('DemographyConfig')->where('DemographyConfigId',$demographyconfigId)->get()->first(); $DisplayName=$Field->LabelValue; $ColumnName=$Field->ColumnName; $DropDownNameId=$Field->DropDownNameId; $DependentField=$Field->DependentField; $Helptext=$Field->Helptext; $parentDropDownListValues=[]; $LabelValue=""; $DropDownNameData=DB::table('DropDownNames')->where('DropDownNameId',$DropDownNameId)->get()->First(); $ParentDropDownNameId=$DropDownNameData->ReferenceID; $ParentColumnValue=""; if($ParentDropDownNameId) { $ParentColumn=DB::table('DemographyConfig')->where('ModuleId',$moduleid)->where('DropDownNameId',$ParentDropDownNameId)->get(['ColumnName'])->first(); $ParentColumnName=$ParentColumn->ColumnName; } $DropdownsList=DB::table('DropDownLists')->where('DropDownNameId',$DropDownNameId)->where('DropDownListStatus',1)->get(['DropDownListId','DropDownListName','ReferenceID']); $DisplayredStar=""; if($mandatory==1) { $ReruiredField="required"; $DisplayredStar="*"; } else { $ReruiredField=""; } //print_r($parentDropDownListValues); $checkApi=explode("/",$_SERVER['REQUEST_URI']); $apiUrl=""; if(strtolower($checkApi[1])=="api") { $apiUrl="api/"; } if($DependentField==1) { $displayHide="displayHide"; } else { $displayHide=""; $RequiredField=""; } @endphp

@if( ($ParentDropDownNameId && $LabelValue) || (!$ParentDropDownNameId) ) @foreach($DropdownsList as $DropdownList) @php $displayValue=0; if($ParentColumnValue) { $thisValueParentValues=explode(",",$DropdownList->ReferenceID); foreach($thisValueParentValues as $thisValueParentValue) { if($ParentColumnValue==$thisValueParentValue) { $displayValue=1; break; } } if($displayValue==0) { continue; } } $selected=""; if($DropdownList->DropDownListId==$LabelValue) { $selected="selected"; } @endphp
@endforeach @endif
Please fill the {{$DisplayName}}