{namespace vh=Newland\NeosViewHelpers\ViewHelpers}
<p>
    Ein Formular wurde soeben ausgefüllt.
</p>

<table>
    <f:for each="{form.formState.formValues}" as="value" key="label">
        <f:if condition="{value} && {label} != 'recaptcha' && {label} != 'dataprivacy' && {label} != 'agb'">
            <tr>
                <th style="text-align: left; padding-right: 10px;">{label}:</th>
                <td>
                    <f:if condition="{value -> vh:type.isDateTime()}">
                        <f:then>
                            {value -> f:format.date(format: 'd.m.Y')}
                        </f:then>
                        <f:else if="{vh:type.isArray(value: value)}">
                            <f:for each="{value}" as="arrayValue" key="arrayLabel">
                                <f:if condition="{arrayValue -> vh:type.isObject()}">
                                    <f:then>
                                        <f:if condition="{arrayValue.resource}">
                                            <f:then>
                                                <neos.media:image image="{arrayValue}" style="width: 480px; height: auto;" alt=""/>
                                                <br/>
                                            </f:then>
                                            <f:else>
                                                {arrayValue.fileName} <br/>
                                            </f:else>
                                        </f:if>
                                    </f:then>
                                    <f:else>
                                        {arrayValue} <br/>
                                    </f:else>
                                </f:if>
                            </f:for>
                        </f:else>
                        <f:else if="{value -> vh:type.isObject()}">
                            <f:if condition="{value.resource}">
                                <f:then>
                                    <neos.media:image image="{value}" style="width: 480px; height: auto;" alt=""/>
                                </f:then>
                                <f:else>
                                    {value.fileName}
                                </f:else>
                            </f:if>
                        </f:else>
                        <f:else>
                            {value}
                        </f:else>
                    </f:if>
                </td>
            </tr>
        </f:if>
    </f:for>
</table>