adrian Posted February 4, 2013 Share Posted February 4, 2013 I have a fieldset with 12 fields (months of the year). I have the widths of each field set to 15%. In the admin backend, InputfieldColumnWidthFirst is applied to January and July as expected, but in my front end form, it is being applied to January and August which is messing up the two row layout that I'm after. My template code looks basically like this: $form = $modules->get('InputfieldForm'); $fields = $page->getInputfields(); foreach($fields as $f){ $form->append($f); } Is it possible this is a bug, or am I doing something wrong? Link to comment Share on other sites More sharing options...
ryan Posted February 4, 2013 Share Posted February 4, 2013 Try to make your columns to add up to 100% if possible. 15x6 = 90. 15x7=105. 16x6=96. 16% would get you closer to 100%. You could use 16% instead and make the first or last four in the column 17%. As for why they would be behaving differently in two different instances, that's a good question, and I'm not sure about that. It's the same code that executes regardless of output, so that's a mystery. I will have to give it a try. What are the two scenarios where you are doing this so I can reproduce most accurately? Link to comment Share on other sites More sharing options...
adrian Posted February 4, 2013 Author Share Posted February 4, 2013 Perfect - I had actually tried 16% initially and that didn't work either. I didn't realize it actually had to add up to 100% exactly. That change did the trick, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now