php - Create icon inside of input with bootstrap and cakePHP -
i have cakephp code:
<?php echo $this->form->input('about_me', array('label' => __l('about me'), 'class' => 'form-control', 'before' => '<div class="form-group form-group-icon-left"><i class="fa fa-user input-icon input-icon-show"></i>', 'after' => '</div>', array('escape' => false) ) ); ?>
i output (indented readability):
<div class="col-md-6"> <div class="form-group form-group-icon-right"><i class="fa fa-map-marker input-icon"></i> <label>about me</label> <input class="form-control" placeholder="write something" type="text" /> </div>
anyone can help?
my solution this:
<div class="form-group form-group-icon-right"> <i class="fa fa-map-marker input-icon"></i> <?= $this->form->input('about_me', [ 'div' => false, 'label' => 'about me', 'placeholder' => 'write something', ];?> </div>
i set 'label' => false
, used cakephp function input field , customized structure in pure html.
Comments
Post a Comment