python - How to set active tab using crispy form? -
i have following code snippet show tabs using crispy form in modelform. possible set active tab when page loads? put css_class='active"
in second tab, seems not working. in advance
self.helper.layout = layout( common_layout, tabholder( tab( 'tab1', field('name', readonly=true), field('age', readonly=true), ), tab( 'class', field('grade 1'), css_class="active", ), ) )
active should lowercase
# ... tab( 'class', field('grade 1'), css_class="active", ), #...
Comments
Post a Comment