【发布时间】:2014-05-30 07:16:40
【问题描述】:
这是我在hook_form_alter 函数中用于设置占位符属性的代码:
if ($form_id == 'contact_site_form') {
$form['name']['#title'] = t('name/family name');
$form['name']['#attributes']['placeholder'] = t('Enter your name');
}
为什么不为联系人字段设置占位符属性?
【问题讨论】:
标签: drupal-7 drupal-hooks form-api