Skip to content

Instantly share code, notes, and snippets.

@wowaTYPO3
Last active January 27, 2023 06:30
Show Gist options
  • Save wowaTYPO3/e253aece0f174c9c7216840ac231e198 to your computer and use it in GitHub Desktop.
Save wowaTYPO3/e253aece0f174c9c7216840ac231e198 to your computer and use it in GitHub Desktop.
/Resources/Private/Extensions/powermail/Partials/Form/Field/Input.html
<div
class="powermail_fieldwrap powermail_fieldwrap_type_input powermail_fieldwrap_{field.marker} {field.css} {settings.styles.framework.fieldAndLabelWrappingClasses}">
<f:render partial="Form/FieldLabel" arguments="{_all}" />
<div class="{settings.styles.framework.fieldWrappingClasses}">
<f:if condition="{vh:validation.fieldTypeFromValidation(field:field)} == 'email'">
<f:then>
<f:form.textfield type="{vh:validation.fieldTypeFromValidation(field:field)}" property="{field.marker}"
placeholder="{field.placeholder}" value="{vh:misc.prefillField(field:field, mail:mail)}"
class="powermail_input {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}"
additionalAttributes="{vh:validation.validationDataAttribute(field:field)}"
id="powermail_field_{field.marker}"
pattern="[^@\s]+@[^@\s]+\.[^@\s]+" />
</f:then>
<f:else>
<f:form.textfield type="{vh:validation.fieldTypeFromValidation(field:field)}" property="{field.marker}"
placeholder="{field.placeholder}" value="{vh:misc.prefillField(field:field, mail:mail)}"
class="powermail_input {settings.styles.framework.fieldClasses} {vh:validation.errorClass(field:field, class:'powermail_field_error')}"
additionalAttributes="{vh:validation.validationDataAttribute(field:field)}"
id="powermail_field_{field.marker}" />
</f:else>
</f:if>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment