neilime / twbs-helper-module

Laminas (formerly Zend Framework) module for easy integration of Twitter Bootstrap
https://neilime.github.io/twbs-helper-module/
MIT License
20 stars 20 forks source link

Multicheckbox view helper is removing the hidden element #649

Closed cbichis closed 1 day ago

cbichis commented 6 days ago

Describe the bug The Laminas Form use_hidden_element option makes the view helper to prepend a hidden form input, which is useful for the case there is no selection for multi-checkbox. Possibly for other form elements but I havent tested.

However, TWBS helper module is not inserting this hidden form input if the option is set to true

To Reproduce Steps to reproduce the behavior:

On TwbsHelper\Form\View\Helper\MultiCheckboxTrait by example the $tmpContent contains the hidden form element.

But this is stripped out of the final $content.

froschdesign commented 6 days ago

I think this part is meant:

https://github.com/neilime/twbs-helper-module/blob/cdb1af47cb49771d4200337ebda86be3dc6fe31e/src/TwbsHelper/Form/View/Helper/MultiCheckboxTrait.php#L43-L58

The corresponding tests do not contain anything for a hidden form element:

https://github.com/neilime/twbs-helper-module/blob/cdb1af47cb49771d4200337ebda86be3dc6fe31e/tests/TestSuite/TwbsHelper/Form/View/Helper/FormMultiCheckboxTest.php#L12-L39

cbichis commented 6 days ago

Yes.

neilime commented 1 day ago

@cbichis it should be fixed in https://github.com/neilime/twbs-helper-module/releases/tag/v6.1.0

Let me know

cbichis commented 1 day ago

Thanks, it seems to be fixed!