@php if(isset($recentSubmittedForms) && !empty($recentSubmittedForms)){ foreach($recentSubmittedForms as $submittedFormKey => $submittedFormValue){ foreach($submittedFormValue as $key=>$value){ if($value['component_code'] == 'heading_small'){ echo '

' . $key . '

'; } if($value['component_code'] == 'heading_large'){ echo '

' . $key . '

'; } if($value['component_code'] == 'text_field_small'){ echo '
'; echo ''; echo ''; echo "
"; } if($value['component_code'] == 'text_field_large'){ echo '
'; echo ''; echo ''; echo "
"; } if($value['component_code'] == 'checkbox'){ echo '
'; echo '

' . $key . '

'; if (isset($value['sub_arrays']) && count($value['sub_arrays']) > 0 && is_array($value['sub_arrays'])) { $userFilledAnswer = json_decode($value['user_filled_answer'], true); if( $userFilledAnswer!=null ) { $subIds = explode(',', $userFilledAnswer['sub_ids']); $subIds = array_map('trim', $subIds); // Trim whitespace around each value foreach ($value['sub_arrays'] as $subId => $subLabel) { $isChecked = in_array((string) $subId, $subIds) ? 'checked' : ''; echo '
'; echo ''; echo ''; echo '' . $subLabel . ''; echo "
"; echo "
"; } } } echo "
"; } if($value['component_code'] == 'radio_button'){ echo '
'; echo ''; if (isset($value['sub_arrays']) && count($value['sub_arrays']) > 0 && is_array($value['sub_arrays'])) { $userFilledAnswer = json_decode($value['user_filled_answer'], true); if( $userFilledAnswer!=null ) { $subIds = explode(',', $userFilledAnswer['sub_ids']); $subIds = array_map('trim', $subIds); // Trim whitespace around each value foreach ($value['sub_arrays'] as $subId => $subLabel) { $isChecked = in_array((string) $subId, $subIds) ? 'checked' : ''; echo '
'; echo '' . $subLabel; echo ''; echo "
"; } } } echo "
"; } if($value['component_code'] == 'dropdown'){ echo '
'; echo ''; if (isset($value['sub_arrays']) && count($value['sub_arrays']) > 0 && is_array($value['sub_arrays'])) { $userFilledAnswer = json_decode($value['user_filled_answer'], true); if( $userFilledAnswer!=null ) { $subIds = explode(',', $userFilledAnswer['sub_ids']); $subIds = array_map('trim', $subIds); // Trim whitespace around each value foreach ($value['sub_arrays'] as $subId => $subLabel) { $isChecked = in_array((string) $subId, $subIds) ? 'selected' : ''; if($isChecked){ echo ''; } } } } echo "
"; } if($value['component_code'] == 'terms_conditions'){ echo '
'; echo '

' . $key . '

'; echo '
'; echo ''; echo ''; echo '' . $value['component_question_desc'] . ''; echo "
"; echo "
"; } if($value['component_code'] == 'date'){ echo '
'; echo ''; echo ''; echo "
"; } if($value['component_code'] == 'body_copy'){ echo '
'; echo ''; // echo ''; // echo "
"; } if($value['component_code'] == 'text_field_mobile'){ echo '
'; echo ''; echo ''; echo "
"; } if($value['component_code'] == 'text_field_email'){ echo '
'; echo ''; echo ''; echo "
"; } // if ($value['component_code'] == 'section_step') { // // echo '
'; // // echo ''; // // echo ''; // // echo "
"; // echo '
//
// //
//
//
//
'; // } // echo "
";print_r(json_decode(json_encode($submittedFormValue)));
               }
    
            }
        }
@endphp