You are here

31 password(密码)

admin 的头像
Submitted by admin on 星期二, 2015-06-23 09:35

作者:老葛,北京亚艾元软件有限责任公司,http://www.yaiyuan.com

    生成一个单行文本字段,在这里用户的输入不直接显示出来。

 

示例代码,来自(user.module):

 

$form['account']['current_pass'] = array(

'#type' => 'password',

'#title' => t('Current password'),

'#size' => 25,

'#access' => !empty($protected_values),

'#description' => $current_pass_description,

'#weight' => -5,

);

 

常用属性:  #access、 #after_build、 #ajax、 #attributes、 #description、 #disabled、 #element_validate、 #field_prefix、 #field_suffix、 #maxlength (默认为128)、 #parents、 #post_render、 #prefix、 #pre_render、 #process、 #required、 #size (默认为60)、 #states、 #suffix、 #theme、 #theme_wrappers、 #title、 #title_display、 #tree、 #type、 #weight


Drupal版本: