Hide label for input field

前端 未结 7 868
孤街浪徒
孤街浪徒 2021-02-06 23:04

I am trying to hide the label for a specific field in _form.php without success.

I have tried couple of variation like, but none is working:



        
7条回答
  •  臣服心动
    2021-02-06 23:39

    At time of writing after digging into the core code, I have found this to be the best solution to hide the label and prevent rendering the full field template with errors etc. for hiddenInput.

    field($model, 'address_uuid', [
        'template' => '{input}',
        'options' => ['tag' => false]
    ])->hiddenInput([
        'readonly' => true,
    ])->label(false)
    ?>
    

提交回复
热议问题