2017-02-15 11 views
3

ラベル付きフォームグループ入力ボックスを非表示にする方法jqueryjqueryのラベル付きフォームグループ入力ボックスを非表示にするにはどうすればいいですか?

  • formcode.twigファイルのHTMLコード:

<div class="form-group row"> 
 
    <label for="4c609cf1bbb6c5080865df9cfc1fb649_code_details_ctk_code" class="col-sm-4 control-label"> 
 
    Code</label> 
 

 
    <div class="col-sm-8"> 
 
    <div class="input-group col-lg-7 col-md-8 col-sm-12 col-xs-12"> 
 
     <input type="text" class="form-control pull-left" id="4c609cf1bbb6c5080865df9cfc1fb649_code_details_ctk_code" value=""><span class="input-group-addon dt_col_show_hide_trigger"> 
 
      <div class="bootstrap-switch bootstrap-switch-wrapper bootstrap- switch-on bootstrap-switch-id-show_hide_4c609cf1bbb6c5080865df9cfc1fb649_code_details_ctk_code_trigger bootstrap-switch-animate" style="width: 109.5px;"><div class="bootstrap-switch-container" style="width: 160px; margin-left: 0px;"><span class="bootstrap-switch-handle-on bootstrap-switch-primary" style="width: 53px;">Hide</span> 
 
     <span 
 
     class="bootstrap-switch-label" style="width: 53px;">&nbsp;</span><span class="bootstrap-switch-handle-off bootstrap-switch-default" style="width: 53px;">Show</span> 
 
     <input id="show_hide_4c609cf1bbb6c5080865df9cfc1fb649_code_details_ctk_code_trigger" type="checkbox" value="Y" checked="checked"> 
 
    </div> 
 
    </div> 
 
    </span> 
 
</div><span class="help-block"> 
 
    </span> 
 
</div> 
 
</div>

+0

は、あなたがこれまでに何をしようとしたのですか? –

+0

詳細を追加してください –

答えて

1

これは、非表示のために使用されます。

CSSで
<script type="text/javascript"> 
$('#4c609cf1bbb6c5080865df9cfc1fb649_code_details_ctk_code').parents('.form-group').hide(); 
</script> 
0

:JavaScriptで

.form-control{ 
    display:none; } 

$('.form-control').hide(); 
関連する問題