1.

Why do we need a static Control in Bootstrap

Answer»

While creating a form, you may sometimes need to include a plain text next to a form label within a horizontal form. For that, use the class .form-CONTROL-static.

The example displays the role of static control in Bootstrap:

<!DOCTYPE html> <html lang="EN"> <head>   <title>Bootstrap Static Control</title>   <meta charset="utf-8">   <meta name="viewport" CONTENT="width=device-width, initial-scale=1">   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>Admissions</h2>   <form class = "form-horizontal" role = "form">    <div class = "form-group">       <label class = "col-sm-2 control-label">Student Email</label>       <div class = "col-sm-10">          <p class = "form-control-static">example@demo.com</p>       </div>    </div>    <div class = "form-group">       <label for = "pwd" class = "col-sm-2 control-label">Password</label>       <div class = "col-sm-10">          <input type = "password" class = "form-control" id = "pwd" placeholder = "ENTER Password">       </div>    </div> </form> </div> </body> </html>

The OUTPUT:



Discussion

No Comment Found