Bug #39138
sysEXT:form checkbox send as input field in EMail
| Status: | Accepted | Start date: | 2012-07-20 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | Patrick Broens | % Done: | 100% |
|
| Category: | Form Wizard | |||
| Target version: | - | |||
| TYPO3 Version: | 4.7 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 2 (View) |
Description
Hi there.
I am not shure if this is the right place, but since tx_form ist shipped as sysext it could be the right place.
If not, please let me know...
I have checkboxes defined in my form:
20 = CHECKBOX
20 {
name = BSH_FICHTE
label = BSH BRETTSCHICHTHOLZ SKANDINAVISCH- UND HEIMISCHE FICHTE
}
...more checkboxes, more input....
there are rendered in FE as expected (mail-FE.jpg).
The sendt Email ist weired: normal txet-input is redered OK, but the checkboxes are all sent in the email an rendered unreadable.
(mail-html.jpg).
If I switch my Mailer (thunderbird) to show text-only, the embedded TXT version is shown, and this is perfectly OK.
(mail-text.jpg).
Using Typo3 4.7.2
Guess this should be fixed ASAP....
For now I am looking for the option to send forms as "Text Only Version...."
Christian.
History
Updated by Christian Tauscher 10 months ago
- % Done changed from 0 to 100
This is no Bug.
Behaves as expected.
I forgott that I have set
tt_content.mailform.20.layout {
checkbox = <input /> <label />
}
To force a different rendering (changed order input/label).
This forces wrong rendering in all views :-(
Christian.
Updated by Ernesto Baschny 10 months ago
- Status changed from New to Needs Feedback
Christian, so you are implying that this is not a bug? Maybe perhaps some feature that you might be missing?
Please specify if we can close this issue. Else you need to rephrase your question or request more precisely.
Thanks for your help!
Updated by Franz Koch 10 months ago
I'd say it's a bug. And the bug itself is that the extension is using the FE rendering template also for the mail rendering. I also had this issue when I customized the form layout via TS (as far as it's possible with this limited templating "engine"). The only way to fix it for me was to XCLASS the form extension (class tx_form_View_Mail_Html) and overwrite the typoScript configuration passed to the constructor with email specific TS (if defined). Here is what I did in my XCLASS.
public function __construct(tx_form_Domain_Model_Form $model, array $typoscript) {
// because the TypoScript Factory is singleton it currently holds the TS layout definitions
// for the HTML form and not for mail output. Let's override this.
$TsFactory = t3lib_div::makeInstance('tx_form_Domain_Factory_Typoscript'); // singleton
if (isset($typoscript['email.']['html.']['layout.']) && count($typoscript['email.']['html.']['layout.'])) {
$typoscript['layout.'] = $typoscript['email.']['html.']['layout.'];
} else {
$typoscript['layout.'] = array( 'foo' => 'bar'); // must not to be empty in order to overwrite the current settings, any values will work
}
$TsFactory->setLayoutHandler($typoscript);
return parent::__construct($model, $typoscript);
}
Same happens for the confirmation view btw - but haven't figured out how to fix it there yet :(
Updated by Ernesto Baschny 10 months ago
I've added Patrick to the "watchers" list, maybe he could give us some insight and feedback on what he thinks of it.
Thanks for your report and your additional input, Franz!
Updated by Christian Tauscher 9 months ago
Christian, so you are implying that this is not a bug? Maybe perhaps some feature that you might be missing?
Yes my particular issue was not a bug, but franz pointed out that there is a bug, since mailing and FE Rendering uses the same setup.
So the subject sould be changed to something like. "BE/FE rendering and mail rendering uses same setup" or even Better new bugreport should be created (Franz?).
Thanks for your patience and your help,
Christian.
Updated by Patrick Broens 20 days ago
- Status changed from Needs Feedback to Accepted
- Assignee set to Patrick Broens