[![Stable Build Status](http://img.shields.io/travis/discordier/justtextwidgets/master.svg?label=stable)](https://travis-ci.org/discordier/justtextwidgets/branches) [![Latest Version tagged](http://img.shields.io/github/tag/discordier/justtextwidgets.svg)](https://github.com/discordier/justtextwidgets/tags) [![Latest Version on Packagist](http://img.shields.io/packagist/v/discordier/justtextwidgets.svg)](https://packagist.org/packages/discordier/justtextwidgets) [![Installations via composer per month](http://img.shields.io/packagist/dm/discordier/justtextwidgets.svg)](https://packagist.org/packages/discordier/justtextwidgets) # justtextwidgets Possibility to add hidden fields with text values and explanation texts to the [Contao DCA](https://github.com/contao/contao). Various input types have been developed for use in the [MultiColumWizard (MCW)](https://github.com/menatwork/contao-multicolumnwizard-bundle). Examples for the implementation can be found in the project [MetaModels](https://github.com/MetaModels/core). There are four different `inputType` which can be used in DCA: * justtext * justsmalltext * justtextoption * justexplanation * justlongexplanation ## justtext With `justtext` is intended for use in MCW and creates a label, text and hidden field - label and text can be hidden with the MCW parameters `hideHead` and `hideBody`. In MetaModels this is used in the table of "input/output combinations". ``` $GLOBALS['TL_DCA']['tl_mytable']['fields']['justtext'] = [ 'label' => null, 'exclude' => true, 'inputType' => 'justtext', 'eval' => ['tl_class' => 'cbx w50'] ]; ``` ## justsmalltext `justsmalltext` outputs a simple text and a hidden field. ``` $GLOBALS['TL_DCA']['tl_mytable']['fields']['justsmalltext'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_mytable']['justsmalltext'], 'exclude' => true, 'inputType' => 'justsmalltext', 'eval' => ['tl_class' => 'cbx w50'] ]; ``` ## justtextoption With `justtextoption` it is e.g. possible to output a text for each line in the MCW for each column. In MetaModels this is used in the rendersettings for languages at "JumpTo page". ``` $GLOBALS['TL_DCA']['tl_mytable']['fields']['justtextoption'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_mytable']['justtextoption'], 'exclude' => true, 'inputType' => 'justtextoption', 'eval' => [ 'tl_class' => 'cbx w50', 'options' => ['foo' => ['value' => 'foovalue'], 'bar' => ['value' => 'barvalue']], 'default' => 'barvalue' ] ]; ``` # justexplanation With `justexplanation` a simple text can be output via the parameter `content` and the option `xlabel`. ``` $GLOBALS['TL_DCA']['tl_mytable']['fields']['justexplanation'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_mytable']['justexplanation'], 'exclude' => true, 'xlabel' => [ ['tl_myothertable', 'myWizard'] ], 'inputType' => 'justexplanation', 'eval' => ['tl_class' => 'cbx w50', 'content' => 'Hello World!'] ]; ``` ## justlongexplanation With `justlongexplanation` a complex html block can be output via the parameter `html` to show different content in your input mask. ``` $GLOBALS['TL_DCA']['tl_mytable']['fields']['justlongexplanation'] = [ 'label' => &$GLOBALS['TL_LANG']['tl_mytable']['justlongexplanation'], 'exclude' => true, 'inputType' => 'justlongexplanation', 'eval' => [ 'tl_class' => 'clr', 'html' => '' ], ]; ```This is text, it contains HTML in "just long explanation". Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.