Feature #66589
closed
Allow class for flexform sheet tabs in backend for better field formatting
Added by stephen leger over 9 years ago.
Updated over 4 years ago.
Category:
FormEngine aka TCEforms
Sprint Focus:
Needs Decision
Description
Allow class for flexform sheet tabs in backend
Flexform :
<sheets>
<params>
<ROOT type="array">
<TCEforms>
<sheetTitle>LLL:EXT:myext/Resources/Private/Language/locallang.xlf:sheet.params</sheetTitle>
-> <cssClass>myCustomSheetClass</cssClass>
</TCEforms>
Rendering in backend :
<div style="display: block;" id="DTM-af104f5555-1-DIV" class="c-tablayer myCustomSheetClass">
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
replace line 1747
<div style="display: none;" id="' . $id . '-' . $index . '-DIV" class="c-tablayer">' . ($def['description'] ? '<p class="c-descr">' . nl2br(htmlspecialchars($def['description'])) . '</p>' : '') . $def['content'] . '</div>';
by 1747
<div style="display: none;" id="' . $id . '-' . $index . '-DIV" class="c-tablayer' . ($def['cssClass'] ? ' ' .$def['cssClass'] : '') . '">' . ($def['description'] ? '<p class="c-descr">' . nl2br(htmlspecialchars($def['description'])) . '</p>' : '') . $def['content'] . '</div>';
typo3/sysext/backend/Classes/Form/FormEngine.php
replace line 3125
'content' => $sheetContent
by
3125 'content' => $sheetContent,
3126 'cssClass' => $dataStruct['ROOT']['TCEforms']['cssClass'] ? $this->sL($dataStruct['ROOT']['TCEforms']['cssClass']) : ''
Files
Using palette to do so would have been a better way, but palette concept is closely bound to tables.
When using eg gridelements, there is no direct table relationship, and too many possible variations for this concept to live.
So this is a "quick and dirty" way of handling such cases.
Maybe limit the usable css in a way it wont break future interface.
Display block, width in % (20,25,33,50), and a float:left should be enougth to provide a basic set of formatting capabilities.
As css one can define:
.field-inline .t3-form-field-container-flex{
display:block;
float:left;
}
.field-inline-5 .t3-form-field-container-flex{
width:20%;
}
.field-inline-4 .t3-form-field-container-flex{
width:25%;
}
.field-inline-3 .t3-form-field-container-flex{
width:33%;
}
.field-inline-2 .t3-form-field-container-flex{
width:50%;
}
- Category changed from Form Framework to 1602
- Category changed from 1602 to Form Framework
- Category changed from Form Framework to FormEngine aka TCEforms
This is no issue of Form Wizard. It belongs to FormEngine.
- Status changed from New to Rejected
What the issue author is trying to achieve is a feature for flex forms that is similar to the palette feature of casual TCA. flex forms has neither type-showitems, nor palettes.
The proposed solution is to add a css class to the tabbing of flex forms and inject some css that lets elements on this sheet float left or similar.
Imho, this solution is rather hacky and solves only a fraction of what palettes can do. I think we should re-think the palette handling first, especially towards a better grid system, then maybe change the tca definition accordingly and then think about how we could bring this to flex forms.
Thus, I'd rather close this issue now and would instead think about the future of types and palettes and how to bind this to flex forms.
- Sprint Focus changed from PRC to Needs Decision
Also available in: Atom
PDF