Form Vertical Separator

Is there are way to separate fields in the form vertically (by adding a separator line) ? I know there is the addSeparator function but its only working horizontally.
Please help .

Easiest would probably be adding Columns and then using some styling

$c = $form->add('View_Columns');
$left = $c->addColumn(6);
$left->addField('foo');

$right = $c->addColumn(6);
$right->addField('bar');

$right->addStyle('border-left: 1px');

I’ll divert this question to @mayack to see what’s the best way to have vertical line between 2 columns.

My solutions was something like this (split columns in form):

    $cols = $form->add("Columns");       
    $c1 = $cols->addColumn(6);
    $cols->addColumn()->setHtml()->addClass('vertical-separator'); /* set a hr with class span or width in percentages for the setHtml function*/
    $c2 = $cols->addColumn(6);

CSS

hr {
  margin:0px;
  border:1px dotted #E1E1E1;
}

.vertical-separator {
    transform:rotate(90deg);
    -o-transform:rotate(90deg);
    -moz-transform:rotate(90deg);
    -webkit-transform:rotate(90deg);
}

In this way you can add a line with a specified size between the columns.
This is not the most responsive solution so maybe someone can come up with a better one, for now it did the trick for me.

Hope this helps,
Paul K

That’s actually pretty responsive, I think you just need to add few classes:

$columns->addClass('atk-stack-mobile');
$middle_column->addClass('atk-hide-mobile');

More documentation on Agile CSS will be up soon at http://css.agiletoolkit.org/

p.s. I aligned your code sample.

I’m looking for a copy of the horizontal separator, but vertical, in the idea of forcing the form to split into columns without doing that manually.
For example …
Add 3 fields
Function to Add vertical separator
Add 3 fields
That should automatically split my form in 2 with a line in between (same as the horizontal separator works).
Just saying it would be nice to have : )