This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 4
Multiple columns problem
Started 9 years ago by Robolovsky | 6 posts |
-
The multiple column feature is great but I am having a problem. My form has four separate checkboxes with corresponding quantity fields. I want the quantity fields to remain invisible until the relevant box is checked so I have given all four checkboxes and their respective quantity fields a column_2 CSS value and set the logic to hide the quantity boxes accordingly.
Problem is that when I do this the form initially displays with the visible fields stacked in a two column formation. Is there any way I can prevent this happening or a better way of stacking these fields?
Posted 9 years ago # -
If it were possible to add a different kind of section break after each pairing of checkbox and quantity field I think that would solve the problem. This would have to be separate from the regular section break as it would have no borders or padding and would only be a pixel or two in height. In effect a spacer of sorts but I think it would prevent the check boxes from displaying two to a row when the quantity fields are hidden.
Posted 9 years ago # -
It's rather hard to be sure I understand your problem correctly just going by your description, but if I do understand it, then I may have a solution. For every field in your form that has the CSS value of "column_2" that you want to be in the first column, whether or not quantity boxes are showing, add "new_row" to the CSS field. The CSS field should contain "column_2 new_row". This will force those items to always start a new row, whether or not the other items with the CSS setting "column_2" are hidden or visible.
Posted 9 years ago # -
Brilliant! Thanks so much williamansley that worked perfectly. This may have been asked before but is there a full list anywhere of these built in CSS statements?
Posted 9 years ago # -
You are very welcome. I'm glad I was able to help. The only place you can see a full list of the built-in CSS styles is in the code. The styles are all defined in view.css. In version 4.3 the definitions start at about line 1409. I see the following styles defined:
column_2
column_3
column_4
column_5
column_6
new_row
hidden
guidelines_bottom
guidelinesI haven't tried this yet, but you should be able to override these style definitions if you redefine them using "advanced CSS" in a theme. I would say that was preferable to actually changing the code in view.css.
Posted 9 years ago # -
Since getting this great solution from williamansley I have now another similar problem. Again this involves fields which are hidden until a checkbox is ticked. I have two checkbox fields each with an image attached and use column_2 to align these next to each other. When either box is ticked I want the number (quantity) field to appear directly underneath the relevant checkbox and image.
This works fine if the first checkbox is ticked and then the second one but if the second one is ticked first, the number field appears on the left of a new column because of the first number field still being hidden. Is there any way I can force it to appear under the second checkbox even if the first number field is hidden?
Posted 9 years ago #
Reply
You must log in to post.