douji9518 2017-04-26 15:18
浏览 41

如何更改Drupal自定义字段的最大字符长度?

I created a field (in Drupal) where I would insert my Product ID. I set that field to allow a max character length of 10 - at the time that is what all of Shopify's Product ID lengths were 10.

I'm using Shopify API to generate some content on my Druapl Website.


I would take a Product ID, Put it into a a field , and render the content - Wallah!.

Unfortunately, for me... Shopify ran out of 10 digits and is now using 11 for their product Ids.
Even more unfortunate, Drupal doesn't allow me to edit this field from 10 max char length to 11.

I would have to create another field which would cause me to lose all previous work.

What I tried:
I tried concatenating two fields to add the remaining one character. I don't think I did it right though or knew where to start.

  • 写回答

1条回答 默认 最新

  • dsw8292301 2017-04-26 16:02
    关注

    Use this module

    But This project is not covered by the security advisory policy. Use at your own risk!

    https://ftp.drupal.org/files/projects/field_maxlength_alter-7.x-1.x-dev.zip

    Install this module and go to field setting tab on your field and increase the field length, don't decrease otherwise you lost old data.

    but keep you site db first to use this module.

    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100