如何用PHP隐藏几个div?

时间:2014-09-17 19:52:52

标签: php button hide

有一个按钮:

<?php echo TbHtml::button(Yii::t('UserModule.main', 'Select Plan'),array('size'=>TbHtml::BUTTON_SIZE_LARGE,'class'=>'btn-select-plan','id'=>'select-free','data-require-payment'=>0,'data-plan'=>Plan::PLAN_ID_FREE));?>

有两个字段集:

    <fieldset class="<?php echo ($requirePayment?'':'hide');?>">
            <div>You need to pay</div>
</fieldset>


<fieldset id="stripe" class="<?php echo ($requirePayment?'':'hide');?>">

    <legend>
        <span class="register-step">4</span>
        <?php echo Yii::t('UserModule.main', 'Payment Info');?>
    </legend>
    <?php echo TbHtml::alert(TbHtml::ALERT_COLOR_ERROR, '<i class="icon-warning-sign"></i> <span id="stripe-error-message"></span>',array('id'=>'stripe-error','class'=>'hide'));?>
    <?php 
    $paymentError=$stripepayment->hasErrors()?'error':'';
    $paymentError.=' temp-payment-field';
    ?>

    <div class="row-fluid card-info">
        <div class="span6">
            <?php echo TbHtml::textFieldControlGroup('creditcard','',array('groupOptions'=>array('class'=>$paymentError), 'prepend'=>'<i class="icon-credit-card"></i>','id'=>'creditcard','label'=>Yii::t('UserModule.main', 'Credit Card Number <span class="required">*</span>')));?>
        </div>
        <div class="span3">
            <?php echo TbHtml::textFieldControlGroup('cvv','',array('maxlength'=>4,'groupOptions'=>array('class'=>$paymentError),'prepend'=>'<i class="icon-credit-card"></i>','id'=>'cvv','label'=>Yii::t('UserModule.main', 'CVV <span class="required">*</span>')));?>
            <?php //'append'=>'<i class="icon-question" rel="tooltip" data-toggle="tooltip" data-placement="top" title="'.Yii::t('content', 'The CVV number is a 3 or 4 digit security code printed on the front or back of your card.').'"></i>',?>
        </div>
    </div></fieldset>

如果我点击按钮,为什么只隐藏第二个字段?我无法修复这个错误。

0 个答案:

没有答案