contao/import — Issue #3065: Form generator: improve form data email sending
Author: DyaGa
Created: 2011-11-29 20:48:12+00:00
State: open
Labels: Feature, frontend

Form module has great feature that can store data in any table and send it's field values by email.

For example, we have next table `tl_example` with fields:

```
id
pid
timestamp
name
email
message
status (type - checkboxes, example: wait, approve ... )
published
```

I create a form in BE with fields and add info for sending email and storing data to `tl_example` table. The field types are:

```
type name label ...
Hidden pid
Text field name ???
Text field email ????? ??????????? ?????
Textarea message ?????????
Checkbox menu status ??????

```

But, when user receive an email the field names will be in English. Example:

```
Pid: 2
Name: ????
Email: some@mail.ru
Message: ????????? ?????????
Status: wait
```

System takes field names from table `tl_form_field` and make it first letter in uppercase. To my mind, it will be great if system will take i18n field `label` for generating email message and in this case email would be localized for user:

```
Pid: 2
???: ????
????? ??????????? ?????: some@mail.ru
?????????: ????????? ?????????
??????: ? ????????
```

Where value `???` is a label value for field `name` and `????? ??????????? ?????` - label for `email`, `? ????????` also is a label for checkbox field value `wait`.

Also, I would like to have a property `Don't send via email` (as examaple) for field in form. If this option is checked, then field will not be included in email message. In our example, I don't want to include field `pid` in email message.

--- _Originally created on May 11th, 2011, at 01:41pm (ID 3065)_