I'm certainly no contour expert, but I can't think of any reason why you can't simply replace your code with:
<div class="form-group @f.CssClass" ...
Which will simply apply both classes - giving you your bootstrap styling and allowing any conditional display control added (presumably by javascript) later on by contour.
That' s true, I eventually did that and it works perfectly.
Still I' d really like to know more about how things are hooked up in Contour. I really cannot seem to find the bit of js that takes care of the hiding/unhiding :s
Bootstrap style forms and conditionals
Hi,
I like to style my contour forms using Bootstrap.
For the purpose, I often edit the standard views, including Forms.cshtml:
Enphasis on:
Which I replace (among other things) with:
This however, stops conditional fields from working.
I think it is because @f.CssClass always seems to be set to:
particularly, removing "contourField" stops conditionals from working.
Two questions:
I really would like to understand this better...
Cheers,
Kris
I'm certainly no contour expert, but I can't think of any reason why you can't simply replace your code with:
Which will simply apply both classes - giving you your bootstrap styling and allowing any conditional display control added (presumably by javascript) later on by contour.
Hi Dominic,
That' s true, I eventually did that and it works perfectly.
Still I' d really like to know more about how things are hooked up in Contour. I really cannot seem to find the bit of js that takes care of the hiding/unhiding :s
is working on a reply...