Jump to content

InputfieldColumnWidthFirst applied to wrong field


adrian
 Share

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...