Reply to comment

How to change Description textfield for filefield to textarea

Julia 15/01/2010
Imagefield with textarea for Description

This is a little snippet for Drupal6 for changing a textfield to a textarea
in the Description field of the CCK file field (filefield module).

By default, you can enable Description field, but that will be a textfield input with 128 charecters length,
but already two customes have asked me to make this field longer, because this field is shown
under images in the lightbox box.

<?php
variable_set
('filefield_description_length', 300);
variable_set('filefield_description_type', 'textarea');
?>

Although the author of this module use variables,
he doesn't give the settings form for them.

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options