enter image description here

How can I increase the max lenght of Tab-Title ?


With module: Title you can convert title to field and then you can change the field length

For title-tab goto: admin/structure/types/manage choose your content type and then manage fields edit your field

  • oh sorry, I was thinking you want to change title, not title-tab Oct 14 '15 at 10:43


Maxlength allows you to set maximum length of any field on any form making use of the form API. This includes fields created using the UI. (Example: any text field on a node) In D6 Maxlength allows you to set maximum lengths to the body, title and CCK textfields of any content type (node).

By custom

explain by tostinni


I got the solution for my question. I have create a custom_field_length.module. In custom_field_length module I have add this code.

function custom_field_length_change_text_field_max_length($field_name, $new_length) {
 $field_table = 'field_data_' . $field_name;
 $field_revision_table = 'field_revision_' . $field_name;
 $field_column = $field_name . '_value'; 

 // Alter value field length in fields table
db_query("ALTER TABLE `{$field_table}` CHANGE `{$field_column}` `{$field_column}` VARCHAR( {$new_length} )");

// Alter value field length in fields revision table
db_query("ALTER TABLE `{$field_revision_table}` CHANGE `{$field_column}` `{$field_column}` VARCHAR( {$new_length} )");

// Update field config with new max length
$result = db_query("SELECT CAST(`data` AS CHAR(10000) CHARACTER SET utf8) FROM `field_config` WHERE field_name = '{$field_name}'");
$config = $result->fetchField();
$config_array = unserialize($config);
$config_array['settings']['max_length'] = $new_length;
$config = serialize($config_array);
    ->fields(array('data' => $config))
    ->condition('field_name', $field_name)

function custom_field_length_update_8002() {
  custom_field_length_change_text_field_max_length('field_tab_title', 255);

After enable module I will run update.php after that my field size is increase to 255.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.