I am on creating an Email field for Forms in ATK at the moment and I think it could be a nice Add-On.
Did any of you do something in this direction already?
So, my plan at the moment is:
- In the model, the field can be defined as ‘type’ => ‘email’
- Add validator to see if the syntax is a valid Email Address
- Add a button to the right of the field which opens a modal in which an email can be instantly written and sent using PHPMailer. I plan on HTML Emails, Plaintext is created automatically from HTML Text.
- Add a simple WYSIWYG editor to have the most important text styling options for the Email Body.
- Use standard Header and Footer templates which define the HTML before and after the Email Body which is editable by the user.
Ok, I already implemented 3. and 5., Though not inside a field definition, but as a field->action addition:
Clicking the Email Icon results in a modal being opened which allows to edit and send the Email (apologies for the partly german text):
What do you think? Nice Idea to create an Email field type or complete overkill no one will ever use?