We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a: bug
<?= $this->Form->control('position_tab', [ 'type' => 'select', 'label' => [ 'text' => 'Review tab position', 'class' => 'col-xs-9' ], 'options' => $positionsTab, 'templates' => [ 'select' => '<div class="col-xs-3"><select name="{{name}}"{{attrs}}>{{content}}</select></div>' ] ]) ?>
<div class="form-group select"> <label class="col-xs-9 control-label" for="position-tab">Review tab position</label> <div class="col-xs-3"> <select name="position_tab" class="validator validator form-control" id="position-tab"> <option value="right" selected="selected">Right</option> <option value="left">Left</option> </select> </div> </div>
Or at least, it works like this on 0.6.2
<div class="form-group select"> <label class="control-label col-md-2" class="col-xs-9" for="position-tab">Review tab position</label> <div class="col-md-6"> <div class="col-xs-3"> <select name="position_tab" class="validator validator form-control" id="position-tab"> <option value="right" selected="selected">Right</option> <option value="left">Left</option> </select> </div> </div> </div>
I can understand the extra div caused by formGroup but why the label.class is not being applied?
formGroup
label.class
<?= $this->FormValidator->control('position_tab', [ 'type' => 'select', 'label' => 'Review tab position', 'options' => $positionsTab, 'templates' => [ 'formGroup' => '{{label}}<div class="col-xs-3">{{input}}</div>', 'label' => '<label class="col-xs-9 control-label"{{attrs}}>{{text}}</label>' ] ]) ?>
I want to avoid setting templates.label when there's no need. I think this should work:
templates.label
<?= $this->FormValidator->control('position_tab', [ 'type' => 'select', 'label' => [ 'text' => 'Review tab position', 'class' => 'col-xs-9' ], 'options' => $positionsTab, 'templates' => [ 'formGroup' => '{{label}}<div class="col-xs-3">{{input}}</div>' ] ]) ?>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is a: bug
What you did
Expected Behavior
Or at least, it works like this on 0.6.2
Actual Behavior
I can understand the extra div caused by
formGroup
but why thelabel.class
is not being applied?Hack to fix it
I want to avoid setting
templates.label
when there's no need. I think this should work:The text was updated successfully, but these errors were encountered: