To customize a snippet, add your version under the directory site/snippets/email-manager. For example, if you want to modify the form rendering, create a new snippet file in the directory with the same name as the original. The Email Manager will automatically use your custom snippet instead of the default one.
The default snippets are designed to handle most email form use cases. Customize them only if necessary, and test thoroughly to avoid unexpected issues.
Additionally, $field provides access to several useful helper functions to streamline customization.
# String with all attributes for the input element
$field->attr(): string
# Access the field value
$field->value()
# get the field type
$field->type(): string
# get the class
$field->class(): string
# get the placeholder text
$field->placeholder(): ?string
# get the requiered status
$field->required(): bool ?? false
# get the aria label
$field->ariaLabel(): ?string
# get the field options
$field->options(): ?array
The following snippets are fully customizable and can be overwritten by adding a file with the same name in the site/snippets/email-manager directory. This flexibility allows you to adapt the default functionality and appearance to better suit your project’s requirements.
This snippet renders checkbox groups for forms, allowing users to select multiple options.
This snippet renders a date-range fields, allowing users to select a start and end date.
This snippet renders a date picker for forms, enabling users to select a specific date for appointments or deadlines.
This snippet renders an email input field for forms, allowing users to provide their email address for communication purposes.
This snippet renders a file upload field for forms, enabling users to attach files such as resumes, images, or documents.
This snippet renders a numeric input field for forms, allowing users to enter numerical data such as quantities or IDs.
This snippet renders a group of radio buttons for forms, enabling users to select one option from a predefined set.
This snippet renders a dropdown menu for forms, allowing users to choose a single option from a list.
This snippet renders a telephone input field for forms, enabling users to provide their phone number for contact purposes.
This snippet renders a single-line text input field for forms, allowing users to enter brief information such as names or titles.
This snippet renders a multi-line text area for forms, enabling users to input longer messages or comments.
This snippet renders a time picker for forms, allowing users to select a specific time for meetings or appointments.
This snippet renders a URL input field for forms, enabling users to provide a website link or other online resource.
After customizing a snippet, test its functionality thoroughly:
Testing ensures your customizations are reliable and meet the needs of your project.