@php
$loopcount=1;
$closediv=0;
$i=0;
@endphp
@foreach($header as $fieldList)
@php
$field_name=$fieldList['FieldName'];
$DisplayName=$fieldList['DisplayName'];
$DisplayType=$fieldList['DisplayType'];
$LabelValue = $results_obj[0]->$field_name;
if($DisplayType==2)
{
if(empty($ListBoxNamesIDs))
{
$LabelValue="";
//$LabelValue=$GetDropdownLists[$LabelValue];
}
else
{
$ListBoxNamesIDVal=$ListBoxNamesIDs[$field_name];
$listBoxVal=$GetDropdownLists[$ListBoxNamesIDVal];
$LabelValue=$listBoxVal[$LabelValue];
}
}
if($DisplayType==4 && $DateFormat!="" && $LabelValue!="")
{
// added on 28th April '21
$LabelValue = date("$DateFormat", strtotime($LabelValue));
}
if($DisplayType==14 && $DateFormat!="" && $TimeFormat!="" && $LabelValue!="")
{
// added on 29th April '21
$datetime = new DateTime($LabelValue);
$datetime->format("$DateFormat $TimeFormat");
$la_time = new DateTimeZone($TimeZone);
$datetime->setTimezone($la_time);
$LabelValue = $datetime->format("$DateFormat $TimeFormat");
}
if($DisplayType==8)
{
// RelateTo
$passArray=array("ModuleId"=>$LabelValue,"RowId"=>$field_name);
if($LabelValue!="")
$LabelValue=$RelateModules[$LabelValue];
}
if($DisplayType==15 && $LabelValue!="")
{
// AssignedTo
if(array_key_exists($LabelValue,$AssignedToList))
{
$LabelValue=$AssignedToList[$LabelValue]['name'];
}
}
if($DisplayType==7 || $DisplayType==10)
{
// TextArea OR TextEditor, added on 6th May '21
$LabelValue=strip_tags($LabelValue);
}
@endphp
@if($loopcount == 1)
@endif
{{$DisplayName}}
{{$LabelValue}}
@if($loopcount == 3)
@php
$loopcount=1;
$closediv = 0;
@endphp
@else
@php
$loopcount = $loopcount+1;
$closediv = 1;
@endphp
@endif
@php
$loopcount++;
$i++;
@endphp
@endforeach
@if($closediv == 1)
@endif