在我的钩子表单中,这是出生日期数组:
[Birthdate] => Array(
[#type] => fieldset
[#title] => Birthdate
[#weight] => 1
[profile_birthdate] => Array(
[#type] => date
[#title] => Birthdate
[#default_value] =>
[#description] => The content of this field is kept private and will not be shown publicly.
[#required] => 1
)
)
我试过了:
unset($form['Birthdate']['profile_birthdate']);
unset($form['Birthdate']);
这不起作用,因为我仍然收到“请输入有效的出生日期”消息。我希望隐藏该字段并且没有消息。