Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 drupal 表单,我希望将一个字段设为隐藏,当用户单击提交按钮时,该隐藏字段应显示在弹出窗口中。然后用户应该能够在该字段中输入一些值并提交表单。请帮我在drupal中做到这一点。提前致谢
这就是我会做的
1)使用js隐藏该字段。
$('#fieldtohide').hide();
2)在表单上有一个按钮,它不提交表单但使字段可见。
$('#fieldtohide').show();
3) 然后用实际的提交按钮显示“fieldtohide”。
我没有看到为此使用drupal forms api。这可以使用js来完成。