Bootstrap Editor: Horizontal Form
Bootstrap Editor: Horizontal Form
Is there anyway to display the editor form inputs in a horizontal layout? If possible, center the contents.
Currently, I am only getting the vertical or stacked layout when using the bootstrap 3 styling, with the contents aligned to the left.
Also, is it possible to change the size of the buttons (edit, update, delete)?
Finally, can col specs be changed in the following col-md-6?
table.buttons().container().appendTo($('.col-sm-6:eq(0)', table.table().container()));
The search button, which shares row with the action buttons, has the col specs: col-sm-6.
This question has accepted answers - jump to:
Answers
Yes, you would need to add styles to do this though since the fields are in
div
elements which are 100% width by default. A suitable selector might bediv.DTE_Field
and float them left or use flex box.Possibly a better option might be to use templates which was introduced in 1.6.
Yes, that is a CSS issue as well:
div.dt-buttons a.btn
for Bootstrap styling.Yes, use the
dom
option to set the value you want to use. The documentation shows the default value for Bootstrap styling.Allan
A bit disappointing, having to create templates for over 20 tables in a project!!!
Hello,
I have found the source of the problem with the horizontal alignments. It is the col-lg-4 and col-lg-8 for the filed/label and field/input, respectively.
How, do I override these classes in my application?
where you'd put that before your initialisation of Editor and fill it in with whatever class names you want for the layout.
Regards,
Allan
Hello Alan,
Thanks so much, this works well. Still got few things to solve to get a desired table but happy with the progress so far.