0
As attached image I can’t use span when I step to the Cake pattern. Can anyone help me, pfv.
<div class='col-md-12'>
<div class="input-group" >
<!-- Span Bootstrap -->
<span class="input-group-addon" id="email1">E-mail:</span>
<input type="text" class="form-control" id="basic-url" aria-describedby="email1">
</div>
<!-- Fim Span com Bootstrap -->
<!-- Span Bootstrap no padrão CakePHP -->
<div class="input-group" >
<?php echo $this->Form->input('email', ['type' => 'text', 'class' => 'input-group-addon',
'aria-describedby' => 'email', 'span' => ['class' => 'input-group-addon', 'id'=> 'email', 'text' => 'E-mail']
]); ?>
</div>
<!-- Span Bootstrap no padrão CakePHP -->
</div>
Print attached below
What the HTML generated by cake looks like?
– Aline
The result in HTML?
– fabricio_wm
Now it looks like this. https://gist.github.com/FabricioDev/6e18cb38daf4df202f75de778c7c2762
– fabricio_wm
<div class="input-group" > <span class="input-group-addon" id="email">E-mail:</span> <div class="input text required"><label for="email"></label><input type="text" name="email" class="input-group-addon" Aria-describedby="email" required="required" maxlength="50" id="email" value="[email protected]"/></div>
– fabricio_wm
I think you’ll need to change the template, which you should be adding to the div. Check it out: https://book.cakephp.org/3.0/en/views/helpers/form.html#customizing-the-templates-formhelper-uses
– Aline
I do not know how to do this but I found that it is because of the asterism of required. I will try to align the right.
– fabricio_wm