webform page break 修改label

admin 提交于 周一, 04/22/2019 - 15:20

1.page break设置里面修改

2.通过修改action #value

参考代码:

function mymodule_form_node_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  foreach (array_keys($form['actions']) as $action) {
    if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') {
      $form['actions'][$action]['#submit'][] = 'mymodule_form_submit';
    }
  }
}

form结构如图form结构

标签