Hi, I don't want to bother anyone with this, but I really need to figure out why my thing isn't working, so here's the post I made on the forums.
Hi guys, I've been using and really enjoying Drupal for a couple of months now and there's something that I actually can't seem to get going. I've been looking an answer for a while now and now I need to resign myself to ask for help. So here's my problem, I want an horizontal contact form in the footer, pretty much like what you can get from the example on the Webform Block module. So here I am, installed webform and webform block successfully and managed to get it near working, but no more...
I've modified template.php of the theme I'm using(Acquia Slate) by adding this :
function acquia_slate_preprocess_webform_form(&$vars) {
// Code taken from the webform.module
if (isset($vars['form']['details']['nid']['#value'])) {
$vars['nid'] = $vars['form']['details']['nid']['#value'];
}
else {
$vars['nid'] = $vars['form']['submission']['#value']->nid;
}
// The sitewide webform block needs special layout treatment xx
if ($vars['nid'] == 10) {
$vars['form']['submitted']['title']['#prefix'] = '<div class="messagefields">' . $vars['form']['submitted']['title']['#prefix'];
$vars['form']['submitted']['email']['#suffix'] = '</div>' . $vars['form']['submitted']['email']['#suffix'];
$vars['form']['submitted']['enquiry']['#prefix'] = '<div class="textfields">' . $vars['form']['submitted']['description']['#prefix'];
$vars['form']['submit']['#suffix'] = '</div>';
}
}I added this at the end of the style.css file :
.messagefields {
float: left;
width: 250px;
height:300px;
margin: 5px 5px 0 0;
padding: 0;
/*background: #fff; */
font-size: 14px;
}.textfields {
float: right;
width: 400px;
height:300px;
margin: 5px -50px 0 -50px;
padding: 0;
/*background: #fff; */
font-size: 14px;You can see the result here : http://www.microsphere.ca/en/contact-test
I'll say this, I thought about everything that could go wrong with this and I can't figure this out myself, I am no programmer, but a big enthusiast who wishes to learn. All I want is the 3 parts of this webform block to be in a row, int the postscript region.
Thanks a lot for considering helping me,
Marc
Comments
Comment #1
budda