Bug #42500
closedSysext form output not adjustable via ts in 4.7.5
0%
Description
In T3 4.7.4 I used the following typoscript to adjust the output of the form sysext:
### Mailform ### tt_content.mailform.10.20 = tt_content.mailform.20.params.form = class="ym-form" #tt_content.mailform.20.stdWrap.dataWrap = <div class="ym-form">|</div> tt_content.mailform.20.stdWrap.wrap = <fieldset class="ym-form"> | </fieldset> tt_content.mailform.20.params.input = class="ym-fbox-text" #tt_content.mailform.20.params.password = class="mf-pass" tt_content.mailform.20.params.textarea = class="ym-fbox-text" #tt_content.mailform.20.params.check = class="mf-check" #tt_content.mailform.20.params.radio = class="mf-radio" tt_content.mailform.20.params.select = class="ym-fbox-select" tt_content.mailform.20.params.file = class="mf-file" tt_content.mailform.20.params.reset = class="ym-button" tt_content.mailform.20.params.submit = class="ym-button" #tt_content.mailform.20.layout = <div class="ym-fbox-text">###LABEL### ###FIELD###</div> #tt_content.mailform.20.COMMENT.layout = <div class="csc-mailform-label1">###LABEL###</div> tt_content.mailform.20.RADIO.layout = <div class="ym-fbox-check">###LABEL### <span class="csc-mailform-radio">###FIELD###</span></div> #tt_content.mailform.20.LABEL.layout = <div class="csc-mailform-field2">###LABEL### <span class="csc-mailform-label">###FIELD###</span></div> ### Mailform End ###
But since 4.7.5, this does not work anymore. I also could not find any documentation about this.
Files
Updated by Georg Ringer about 12 years ago
- Status changed from New to Needs Feedback
can you specify what exactly doesn't work anymore and how this can be reproduced?
Updated by Bernhard Eckl about 12 years ago
The whole typoscript above does not have any affect in 4.7.5 (maybe a few lines still work, I’m not 100% sure). E.g. this doesn’t have any affet in the frontend: tt_content.mailform.20.params.submit = class="ym-button"
Updated by Fabien Udriot about 12 years ago
Checkout manual in SYSEXT:form/Documentation/Manual/en/manual.sxw
. Wouldn't it be more this kind of configuration of the FORM object to tamper?
[...]
Update: I am also facing the problem that the mailform configuration is not applied (running a 4.7.5 TYPO3 too). I haven't dug more than that.
Updated by Tomas Havner almost 12 years ago
Try:
tt_content.mailform.20 {
stdWrap.wrap >
layout {
form (
<form class="form-horizontal">
<containerWrap />
</form>
)
containerWrap (
<section>
<elements />
</section>
)
elementWrap (
<div>
<element />
</div>
)
mandatory (
<sup class="ym-required">
<mandatoryvalue />
</sup>
)
error (
<strong class="ym-message">
<errorvalue />
</strong>
)
textline (
<div class="control-group">
<label class="control-label"><label /></label>
<div class="controls"><input /></div>
</div>
)
textarea (
<div class="ym-fbox-text">
<label />
<textarea />
</div>
)
select (
<div class="ym-fbox-select">
<label />
<select>
<elements />
</select>
</div>
)
checkbox (
<div class="ym-fbox-check">
<input />
<label />
</div>
)
radio (
<div class="ym-fbox-check">
<input />
<label />
</div>
)
button (
<div class="ym-fbox-button">
<input />
</div>
)
reset (
<div class="ym-fbox-button">
<input />
</div>
)
submit (
<div class="ym-fbox-button">
<input />
</div>
)
}
}
/Tomas
Updated by Bernhard Eckl over 11 years ago
Does not work. Any other ideas, is there somebody who knows how it works actually?
In my case I want to add the classes needed to apply css for the yaml css framework (without changing all the css).
I think this should also get integrated into the manual to know how to adjust the output (if it is already known).
Here is also described how it worked in the past: http://forge.typo3.org/issues/42500
Updated by Bernhard Eckl over 11 years ago
- File form-confirmation.png form-confirmation.png added
I just tested the typoscript of Tomas Havner again in the new T3 6.1 and it works now (I also found the part in the manual now).
BUT: If confirmation is activated, the confirmation page is broken, the text in the form is not displayed and it is not possible to send the form.
Here is the html output of the confirmation page and enclosed also a screenshot (confirmation page should not use the typoscript for the layout):
<section> <div class="csc-form-2 csc-form-element csc-form-element-textline"> <div class="ym-fbox-text"> <label>Vorname</label> <div class="controls"> <input/> </div> </div> </div> <div class="csc-form-3 csc-form-element csc-form-element-textline"> <div class="ym-fbox-text"> <label>Nachname</label> <div class="controls"> <input/> </div> </div> </div> <div class="csc-form-4 csc-form-element csc-form-element-textline"> <div class="ym-fbox-text"> <label>Firma</label> <div class="controls"> <input/> </div> </div> </div> <div class="csc-form-5 csc-form-element csc-form-element-textline"> <div class="ym-fbox-text"> <label>E-Mail</label> <div class="controls"> <input/> </div> </div> </div> <div class="csc-form-6 csc-form-element csc-form-element-textline"> <div class="ym-fbox-text"> <label>Betreff</label> <div class="controls"> <input/> </div> </div> </div> <div class="csc-form-7 csc-form-element csc-form-element-textarea"> <div class="ym-fbox-text"> <label>Nachricht</label> <textarea/> </div> </div> </section> <form class="csc-form-confirmation" method="post" action="kontakt/"> <fieldset> <ol> <li class="csc-form-confirmation-false"> <input type="submit" value="Zurück zum Formular" name="tx_form[confirmation-false]" /> </li> <li class="csc-form-confirmation-true"> <input type="submit" value="Bestätigen" name="tx_form[confirmation-true]" /> </li> </ol> </fieldset> </form>
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to New
- Is Regression set to No
Updated by Bernhard Eckl over 10 years ago
Again I had the same problem and solved it by hardcoding into the ext (quick and dirty). The thing is, that for confirmation and mail there should be other typoscript arrays.
Changes (T3 4.7, brackets are replaced by this board…):
Classes/View/Confirmation: line 137
return '<form class="csc-form-confirmation ym-form" method="post" action="' . $action . '">'.$this->localCobj->cObjGetSingle($type, $value);
(The form tag should be at the beginning, otherwise some classes of CSS frameworks are not working)
Classes/View/Mail/Html/Element/Abstract.php: line 221-223
$layout = str_replace('<input />', '</td><td><inputvalue />', $layout);
$layout = str_replace('<textarea />', '</td><td><inputvalue />', $layout);
$layout = str_replace('<div class="ym-fbox-text clearfix">', '<td class="labeltd" style="width: 200px;" >', $layout);
$layout = str_replace('</div>', '</td>', $layout);
And in case elementWrap:
$layout = str_replace('<div>', '<tr>', $layout);
$layout = str_replace('</div>', '</tr>', $layout);
And in containerWrap:
$layout = str_replace('<section>', '<tr>', $layout);
$layout = str_replace('</section>', '</tr>', $layout);
Classes/View/Confirmation/Element/Abstract.php: lines 225-226
$layout = str_replace('<input />', '<inputvalue />', $layout);
$layout = str_replace('<textarea />', '<inputvalue />', $layout);
This works with the following typoscript:
tt_content.mailform.20 {
#stdWrap.wrap >
layout {
form (
<form class="ym-form ym-columnar">
<containerWrap />
</form>
)
containerWrap (
<section>
<elements />
</section>
)
elementWrap (
<div>
<element />
</div>
)
mandatory (
<sup class="ym-required">
<mandatoryvalue />
</sup>
)
error (
<strong class="ym-message">
<errorvalue />
</strong>
)
textline (
<div class="ym-fbox-text clearfix">
<label />
<input />
</div>
)
textarea (
<div class="ym-fbox-text clearfix">
<label />
<textarea />
</div>
)
select (
<div class="ym-fbox-select">
<label />
<select>
<elements />
</select>
</div>
)
checkbox (
<div class="ym-fbox-check">
<input />
<label />
</div>
)
radio (
<div class="ym-fbox-check">
<label />
<input />
</div>
)
button (
<div class="ym-fbox-button">
<label />
<input />
</div>
)
reset (
<div class="ym-fbox-button">
<label />
<input />
</div>
)
submit (
<div class="ym-fbox-button">
<label />
<input />
</div>
)
}
}
So please add additional Typoscript layout options for confirmation and for mail (input can not be used for confirmation and mail, there it should be inputvalue, this is the main problem).
Updated by Bernhard Eckl over 10 years ago
I just had a new project starting with TYPO3 6.2, I also switched to Bootstrap, and I also used extension bootstrap_package. So with this system there is still the same problem (problem can be easily reproduced, the current Demo is based on that version and bootstrap_package, you just have to change the form to get a mail (then you can see that the mail content is buggy) and activate confirmation page (then you can see the broken confirmation page). This is because bootstrap_package has some typoscript for styling the form, but the same problem occurs as I mentioned. Please can someone fix that?! I don’t want to be a lonely talker…
Updated by Frans Saris almost 10 years ago
I think this one can be closed now #31951 is reloved.
Updated by Frans Saris almost 10 years ago
- Status changed from New to Needs Feedback
Updated by Riccardo De Contardi over 9 years ago
- Status changed from Needs Feedback to Closed
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.