hiddenInput takes up space in form

I built an activeform in yii 2.0.1 and added a bunch of hiddenInput fields like so:


<?= $form->field($model, 'id')->hiddenInput()->label('') ?>

The issue is that these field take up real estate on the form. Is this intentional? How can I make the fields not take up space?

The easiest way is to just put them in a hidden div like so:




<div class="hide">

		<?php echo $form->field($model,'id')->hiddenInput(); ?>

		<?php echo $form->field($model,'event_type')->hiddenInput(); ?>		

</div>



That works nicely, thanks. Maybe this should be included in the hiddenInput default html rendering, I cannot think of a use case where the hidden input should influence the form layout.

glad to hear it. Mind upvoting my response? Hopefully others will see it and yes it probably should be included by default.