PHPackages                             markocupic/form-multitextfield-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. markocupic/form-multitextfield-bundle

Abandoned → [markocupic/contao-form-multirow-text-field-bundle](/?search=markocupic%2Fcontao-form-multirow-text-field-bundle)Contao-module

markocupic/form-multitextfield-bundle
=====================================

Form Multitextfield Bundle

1.0.8(5y ago)054MITPHPPHP &gt;=7.0

Since Sep 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/markocupic/form-multitextfield-bundle)[ Packagist](https://packagist.org/packages/markocupic/form-multitextfield-bundle)[ RSS](/packages/markocupic-form-multitextfield-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

### Abandoned:

[](#abandoned)

### Please switch to [markocupic/contao-form-multirow-text-field-bundle](https://github.com/markocupic/contao-form-multirow-text-field-bundle)

[](#please-switch-to-markocupiccontao-form-multirow-text-field-bundle)

form-multitextfield-bundle
==========================

[](#form-multitextfield-bundle)

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

Generate a multitext 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 Input::post('FORM_SUBMIT') === $objHaste->getFormId();
});

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

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

Example controller:

```
