PHPackages                             markocupic/contao-form-multirow-text-field-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. markocupic/contao-form-multirow-text-field-bundle

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

markocupic/contao-form-multirow-text-field-bundle
=================================================

Multirow frontend text field widget for Contao CMS

1.0.2(5y ago)099MITPHP

Since Sep 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/markocupic/contao-form-multirow-text-field-bundle)[ Packagist](https://packagist.org/packages/markocupic/contao-form-multirow-text-field-bundle)[ RSS](/packages/markocupic-contao-form-multirow-text-field-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (3)Used By (0)

contao-form-multirow-text-field-bundle
======================================

[](#contao-form-multirow-text-field-bundle)

[![form-multitextfield-bundle](src/Resources/public/img/screenshot.png?raw=true "Formfield")](src/Resources/public/img/screenshot.png?raw=true)

Generate a multirow text field input within a contao frontend module controller using [codefog/contao-haste](https://github.com/codefog/contao-haste/blob/master/docs/Form/Form.md) form utils:

```
$objForm = new \Haste\Form\Form('pets_form', 'POST', function ($objHaste) {
    return $_POST['FORM_SUBMIT'] === $objHaste->getFormId();
});

$blnMandatory = false;
$objForm->addFormField('pets', [
    'label'     => $this->translator->trans('MSC.pets', [], 'contao_default'),
    'inputType' => 'multirowText',
    'eval'      => ['mandatory' => $blnMandatory, 'multiple' => true],
    'value'     => $value,
]);

$template->forms = $objForm->generate();
```

Example controller:

```
