Fix for hook_form_alter returns WSOD when $form_id is checked, $form_id is returned as an array,works on all forms without $form_id test

decibel.places's picture
  1. /* Implements hook_form_alter */
  2.  
  3. function back_button_form_alter (&$form, $form_id){
  4. if ($form_id == 'video_node_form'){
  5.   $form['back']= array(
  6.         ['#type'] => 'submit',
  7.         ['#value'] => t('Make Changes'),
  8. );
  9. }
  10. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.