Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By jfha73 on
Hey guys,
I created a content type with a text field that now I have to change the maximum length for, how can I do this if the content type already has records on it and it's telling me this cannot be changed when it already has records?
Thanks.
Comments
Backup, delete, change, restore
I don't think there is a simple way.
One way which I suppose should work: backup database, delete records, change field size, reimport data (not structure) from backup.
drupalshrek
I did, but it still shows the
I did, but it still shows the wrong value, I also looked in the database for the content typy where it is, but I can't find it, can anybody tell me where Drupal 7 stores this info (content types) in the database? so I can check if this is there?
Thanks,
=-=
node types are stored in the node types table - non core fields are stored in their own tables.
I found the table, but there
I found the table, but there is nothing on it that says field lengths, so I'm back to square 1, so if the table for the field in the database has the right size on it, how can I make my content type to show/allow this size, not the previous size?
Thanks,
=-=
http://drupal.stackexchange.com/questions/8829/how-to-change-the-length-...
THANKS A MILLION, that worked
THANKS A MILLION, that worked.
Worked or not?
this worked out for you successfully http://drupal.stackexchange.com/questions/8829/how-to-change-the-length-... ?
A work around
Install devel, go to URL(http://sitename/devel/php) and run the code in text editor.
Thank You
IT WORKED
For Some reasons this work on
For Some reasons this work on localhost (Acquia Dev Stack) with success message status but did now work on Live server and no status message. I have to backup DB to Localhost, run the code, then restore back online
Hi Nitin K
Hi Nitin K
Is this going to work in Drupal 8 as well? Thanks
Alter maxlength of any field
You can set max length of any filed in jquery
$(".form-item-title input").attr('maxlength','40');