Using web2py version 2.10.4 with response.formstyle=bootstrap3_inline Problem: When using SQLFORM or SQLFORM.grid(view) the form fields whose value is None or when writable=False do not line up horizontally with the label.
Solution (or hack): In gluon.sqlhtml.py I added the following elif (about line 918) """ elif isinstance(controls, UL): for e in controls.elements("input"): e.add_class('form-control') # bob's fix elif controls is None or isinstance(controls, basestring): _controls = P(controls, _class="form-control-static %s" % col_class) # end bob's fix if isinstance(label, LABEL): label['_class'] = 'control-label %s' % label_col_class """ This is probably more of a hack than a solution... somewhere else in SQLFORM when controls == None or controls == string it should be included inside a SPAN()... But this works for me right now. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.