Timeline for My page is refreshing rather than directing when I hit submit on form [closed]
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 11, 2016 at 21:05 | history | edited | avpaderno♦ | CC BY-SA 3.0 |
removed "Drupal" from the title; removed tags from the title
|
Dec 9, 2016 at 18:45 | review | Reopen votes | |||
Dec 9, 2016 at 21:38 | |||||
Dec 9, 2016 at 18:26 | comment | added | Adrian Cid Almaguer |
from user @vijay that don't have access to comments: try with $form['submit'] = array( '#type' => 'submit', '#value' => 'Queen, Attack!', '#submit' => array(queen_attack_form_submit) ); return $form;
|
|
Dec 9, 2016 at 18:26 | history | edited | Adrian Cid Almaguer | CC BY-SA 3.0 |
added 12 characters in body
|
Dec 9, 2016 at 10:10 | review | Suggested edits | |||
Dec 9, 2016 at 18:24 | |||||
Dec 8, 2016 at 18:18 | comment | added | Clive♦ |
Welcome to Drupal Answers :) What you're describing is a common error for people new to Drupal/PHP...you've simply forgotten to receive $form_state by reference in the submit function definition, so the redirect item you're adding to it doesn't persist when that function completes. To fix, accept the parameter by reference: function queen_attack_form_submit($form, &$form_state){
|
|
Dec 8, 2016 at 18:15 | history | closed | Clive♦ | Not suitable for this site | |
Dec 8, 2016 at 18:09 | review | First posts | |||
Dec 8, 2016 at 18:15 | |||||
Dec 8, 2016 at 18:08 | history | asked | Brigette | CC BY-SA 3.0 |