I like your demo with the 2 columns of links. How did you do that? My list is pretty long.

Thanks

Comments

greenskin’s picture

Status: Active » Fixed

The 2 columns is done with a little css trickery. If you install the share module, it will do the same as the demo. Or if you are wanting your own custom style for your popup but would like to use the two columns, I would suggest copying the share.css file then making your modifications to that file as you see fit. But in simplest form, to generate the two columns you would apply the following css to the li tags:

  • width: 45%;
  • float: left;

Of course you would specify a width for the ul tag so that the 45% is of the ul width and not a different parent width.

rtdean93’s picture

Thanks - this worked... Now another CSS question....

I added the Message field back to the Share-form for the email this form. My textarea that I added is extending past the box. The width setting didn't fix it. Here's my code...

function share_form($nid = null) {
global $base_url, $user;

$form = array();

if ($nid != '') {
$emailtype = 'email';
$form['node'] = array('#type' => 'value', '#value' => node_load((int)$nid));
}
else {
$emailtype = 'postcard';
}

$form['yemail'] = array(
'#type' => 'textfield',
'#title' => t('Your Email'),
'#default_value' => $user->mail,
'#size' => 24,
'#maxlength' => 256,
'#description' => null,
'#attributes' => null,
'#required' => true,
);
$form['yname'] = array(
'#type' => 'textfield',
'#title' => t('Your Name'),
'#default_value' => $user->name,
'#size' => 24,
'#maxlength' => 256,
'#description' => null,
'#attributes' => null,
'#required' => true,
);
$form['recipients'] = array(
'#type' => 'textfield',
'#title' => t('Send To'),
'#default_value' => str_replace(', ', "\n", $recipients),
'#size' => 24,
'#description' => t('Enter one address or multiple addresses separated with commas.'),
'#attributes' => null,
'#required' => true,
);
$form['message'] = array(
'#type' => 'textarea',
'#title' => t('Personal Message'),
'#size' => 24,
);
$form['nid'] = array(
'#type' => 'hidden',
'#value' => $nid,
);
$form['forward_footer'] = array(
'#type' => 'hidden',
'#value' => variable_get('forward_footer', ''),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Send'),
);

greenskin’s picture

For the textarea type, #size is not a valid property. Textarea's size is defined by #rows and #cols.

http://api.drupal.org/?q=api/file/developer/topics/forms_api_reference.h...

rtdean93’s picture

thanks. its fixed.

greenskin’s picture

Status: Fixed » Closed (fixed)