bootstrap cakephp需要帮助

时间:2017-04-12 14:08:44

标签: css twitter-bootstrap cakephp

我正在创建一个带有cakephp2和bootstrap的表单一切正常但我很困惑但我无法解决这个问题任何bootstrap或蛋糕专家帮助我谢谢,

Screnshot

检查此信封是否向上拉伸

这是我的代码

<div class="form-group">
    <div class="input-group">
        <span class="input-group-addon">
            <span class="glyphicon glyphicon-envelope"></span>
        </span>
        <?php echo $this->Form->input('email',
            array(
                'class' => 'form-control',
                'type' => 'email',
                'placeholder' => 'Enter Email'
            )
        ); ?>
    </div>
    <!--<input type="email" class="form-control" id="email" placeholder="Enter email" required="required" /></div>-->
</div>

2 个答案:

答案 0 :(得分:1)

传递参数'label' => false将阻止显示标签

使用

<?php echo $this->Form->input('email',
            array(
                'class' => 'form-control',
                'type' => 'email',
                'placeholder' => 'Enter Email',
    'label' => false
            )
        ); ?>

答案 1 :(得分:-1)

您应该在代码中使用标签false。

<div class="form-group">
    <div class="input-group">
        <span class="input-group-addon">
            <span class="glyphicon glyphicon-envelope"></span>
        </span>
        <?php echo $this->Form->input('email',
            array(
                'class' => 'form-control',
                'type' => 'email',
                'label'=>false,
                'placeholder' => 'Enter Email'
            )
        ); ?>
    </div>
    <!--<input type="email" class="form-control" id="email" placeholder="Enter email" required="required" /></div>-->
</div>