jer*_*emy 5 drupal drupal-webform
我想从特定的Drupal webform中删除提交按钮,这是否可行,如果可以,我该怎么做?
如果可能的话,我也想从同一个表单中删除前一个按钮.
您需要使用@googletop指示的hook_form_alter()来定位和更改该表单
要取消设置提交,自定义模块中的此类内容将起作用:
<?php
function my_custom_module_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'webform_client_form_130') {
if ($thiscondition && $thatcondition){
unset($form['actions']['submit']);
}
}
}
?>
Run Code Online (Sandbox Code Playgroud)
对于"上一个"按钮,您只需要在表单数组中找到它