In summary... new regions where created.
This came out from the need to manage bigger/complex forms, without the need to work at template level.
The ease of use of drag & drop in this module makes editing forms a breeze.
Big thanks for the author.
Here are the areas of change:
1) nodeformcols.module
2) css/nodeformcols.css
See Attachment for overview of final result.
function nodeformcols_form_regions() {
return array(
'header' => t('Header Column'),
'main' => t('Main column'),
'right' => t('Right'),
'header2' => t('2nd Header Column'),
'main2' => t('2nd Main column'),
'right2' => t('2nd Right'),
'header3' => t('3rd Header Column'),
'main3' => t('3rd Main column'),
'right3' => t('3rd Right'),
'header4' => t('4th Header Column'),
'main4' => t('4th Main column'),
'right4' => t('4th Right'),
'footer' => t('Footer'),
);
}
...
...
...
...
...
...
// Ensure that we have the footer wrapper so that
// we clear the floating columns
if (!$has_elements['footer'] || !$has_elements['header2'] || !$has_elements['header3'] || !$has_elements['header4'] ) {
$has_elements['footer'] = TRUE;
$has_elements['header2'] = TRUE;
$has_elements['header3'] = TRUE;
$regions['footer'][] = array(
'#type' => 'markup',
'#value' => '<div class=aux-clearer></div>',
);
$regions['header2'][] = array(
'#type' => 'markup',
'#value' => '<div class=aux-clearer></div>',
);
$regions['header3'][] = array(
'#type' => 'markup',
'#value' => '<div class=aux-clearer></div>',
);
$regions['header4'][] = array(
'#type' => 'markup',
'#value' => '<div class=aux-clearer></div>',
);
}
And here is the css
/* $Id: nodeformcols.css,v 1.2 2009/03/04 20:14:55 hugowetterberg Exp $ */
.node-form-has-region-header .form-region-header {
clear: both;
}
.node-form-has-region-main .form-region-main {
float: left;
width: 49%;
}
.node-form-has-region-right .form-region-right {
width: 49%;
float: right;
}
/*====================================================*/
.node-form-has-region-header2 .form-region-header2 {
clear: both;
content: ".";
}
.node-form-has-region-main2 .form-region-main2 {
float: left;
width: 49%;
}
.node-form-has-region-right2 .form-region-right2 {
width: 49%;
float: right;
}
/*====================================================*/
.node-form-has-region-header3 .form-region-header3 {
clear: both;
}
.node-form-has-region-main3 .form-region-main3 {
float: left;
width: 49%;
}
.node-form-has-region-right3 .form-region-right3 {
width: 49%;
float: right;
}
/*====================================================*/
.node-form-has-region-footer .form-region-footer {
clear: both;
}
.aux-clearer{clear: both;}
Comment | File | Size | Author |
---|---|---|---|
#2 | sample-form.JPG | 75.06 KB | bakr |
regions.JPG | 111.66 KB | bakr |
Comments
Comment #1
bakr CreditAttribution: bakr commentedPlease note, that I had to add a new class "aux-clearer".
This was essential to overcome IE css rendering issues.
With All Best Regards
Comment #2
bakr CreditAttribution: bakr commentedThis is a working sample snapshot from my site.
And sorry, I just realized I forgot to include the css for the fourth regions..
here it is, just append the above with the following:
Comment #3
bakr CreditAttribution: bakr commentedThe following css should be addedd to ie7 fix file.
Note: you may change the width depending upon suitability with your theme.
Comment #4
AntiNSA CreditAttribution: AntiNSA commentedCan someone roll this into a patch or update the dev version with this fix?
Comment #5
okday CreditAttribution: okday commentedYes, It must be added to the dev version
thanks.
Comment #6
GreyHawk CreditAttribution: GreyHawk commentedBakr -- I think you also left out a PHP line, tho take it with a grain of salt as I'm still learning...
Here:
Shouldn't that be this?
I don't know if it'll throw an error or not, but looks like "header4" might be needed there...
Comment #7
AntiNSA CreditAttribution: AntiNSA commentedwhere is that patch?
Comment #8
bakr CreditAttribution: bakr commentedAs for "Header4", you are right, actually the regions.jpg was a theoretical draft.
As what we care about is simply a div that is cleared from both.
So, name it as you wish, you can add more, but make sure it is consistent and has a CSS equivalent markup.
As for the patches, I do not know use any diff tool. maybe someone could help here.
Regards
Comment #9
Skirr CreditAttribution: Skirr commentedreally musthave extention
Comment #10
itserich CreditAttribution: itserich commentedThis might be a good addition to D7.
Comment #11
asherry CreditAttribution: asherry at Aten Design Group commentedUpdating all 6.x tickets as they are no longer supported. Feel free to re-open, I will commit any needed patches still.