2017-11-03 18 views

答えて

0

あなたはそれが形成するものを確認することから始め、その後、カスタムはとても

function your_module_form_alter(&$form, FormStateInterface $form_state, $form_id) { 
    // test you are altering the correct form so wrap the below in an IF 
    $form['actions']['submit']['#submit'][] = '_your_module_custom_redirect'; 
} 

function _your_module_custom_redirect($form, FormStateInterface $form_state) { 
    $form_state->setRedirect('your route name'); 
} 

または多分使用のようなコールバックを提出追加するカスタムモジュールを作成し、

hook_form_alter()

を使用する必要がありますhook_ENTITY_TYPE_insert()私はhook_form_alterが検証に関係なく実行されると思いますが、私はその100%ではありません

関連する問題