Suppose you have view information (not edit information) when using twitter bootstrap. What's the best way to display the data?
This was actually brought up as an issue: https://github.com/twitter/bootstrap/issues/4094.
twitter-bootstrap
Suppose you have view information (not edit information) when using twitter bootstrap. What's the best way to display the data?
This was actually brought up as an issue: https://github.com/twitter/bootstrap/issues/4094.
Best Answer
Bootstrap 3
BS3 has a concept of a static field. You can mix and match static fields and input fields on the same form. Or use all static fields for a read only form.
http://getbootstrap.com/css/#forms-controls-static
Instead of a normal
input
element, you can use ap
tag with this special bootstrap class:Bootstrap 4:
You can use the
form-control-plaintext
class on aninput
tag.See https://getbootstrap.com/docs/4.0/components/forms/#readonly-plain-text
Boostrap 5:
form-control-plaintext