[support] Non intrusive form layout change in 5.X
Ivan Sergio Borgonovo
mail at webthatworks.it
Mon Mar 17 19:06:53 UTC 2008
On Mon, 17 Mar 2008 10:52:41 -0700
"Metzler, David" <metzlerd at evergreen.edu> wrote:
> * Try Using #prefix and #suffix to wrap the whole mess in a div to
> give you more css control.
I was not able (I'm not a css black belt) to obtain exactly what I
was looking for but I got nearer...
The textfield is aligned to the first element of the list of
checkboxes.
I added an array level just to wrap the 2 elements with a div
$form['somegroup']['wrapper']=array(
'#prefix'=>'<div class='other_container>',
'#suffix'=>'</div><div class="clearer"></div>',
);
$form['somegroup']['wrapper']['radiofield']=Array(
'#prefix'=>'<div class="other_left">',
'#suffix'=>'</div>',
// ...
);
$form['somegroup']['wrapper']['radiofield']=Array(
'#prefix'=>'<div class="other_right">',
'#suffix'=>'</div>',
// ...
);
//...
// already part of theme css:
.clearer {
clear: both;
height: 1px;
}
.other_conainer {
}
.other_left {
float: left;
}
.other_right {
padding-top: 10px;
}
I think I could put it at the bottom but it does look that there are
higher chances it won't work on some browsers...
Some css wizard may help.
> * Change the checkboxes into a checkbox variable with #tree=true,
> this makes the other box at the same level (Alternately you could
> aways tweek the code to add 'Other' to the options array.
It was an option... but that would put too much layout stuff in code
and make the code longer.
> * add the other box to the options array.
???
thanks
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
More information about the support
mailing list