我需要限制属性(“灵感”)的文本字段长度,类似于meta_description。我试图复制在Attributes.php代码块(\程序\代码\核心\法师\ Adminhtml \块\目录\产品\编辑\选项卡):Magento checkmaxlenght文本属性
if ($form->getElement('meta_description')) {
$form->getElement('meta_description')->setOnkeyup('checkMaxLength(this, 255);');
}
,并以 “灵感” 代替 “meta_description” ,但它不起作用。任何人都可以帮助我吗?