0

enter image description here

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

| improve this question | | | | |
0

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

| improve this answer | | | | |
  • oh sorry, I was thinking you want to change title, not title-tab – Paul Bönisch Oct 14 '15 at 10:43
0

Maxlength

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

| improve this answer | | | | |
0

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);
db_update('field_config')
    ->fields(array('data' => $config))
    ->condition('field_name', $field_name)
    ->execute();
}

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.

| improve this answer | | | | |

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.