Form Builder sub-attributes options not working

Web Tips Q & ACategory: Krajee Yii2 ExtensionsForm Builder sub-attributes options not working
chrisbee asked 3 months ago

Hi Kartik
I have a form with sub-attributes and want to create an input container or container around those sub-attributes but it doesn’t work.

      'expiry_date' => [
                'label' => 'Expiry Date',
               'columnOptions' => ['colspan' => 2],
                // try container
                'container' => ['class' => 'input-group'],
                // try adding class to existing container
              'options' => ['class'=>'input-group'],
              // try adding input container
              'inputContainer' => 'form-groupx',
                'attributes' => [
                    'cc_expiry_date_mm' => [ ... ],
                      'cc_expiry_date_yy' => [ ... ]
                ]
              ]

this creates HTML as follows:-




Expiry Date





Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec


</div>
</div>



2015
2016
2017
2018
2019
2020
2021
2022
2023



</div>
</div>
</div>
</div>
</div>
</div>

Login or register to contribute or comment.

Login   Register