Fix for how to name fapi calls

  1. // generic function
  2. function mymod_form_alter(&$form, $form_state, $form_id) {
  3.         //dpm($form); -- I frequently use this devel call to check things out as needed
  4.         if ($form_id == 'ccktype_node_form') {
  5.             $form['field_myfield'][0]['#required'] = 0;
  6.         }
  7. }
  8.  
  9. // dedicated function
  10. // change the title of the Registration page, and add some instructions before the form.
  11. function mymod_form_user_register_alter(&$form, &$form_state) {
  12.         //dpm($form);
  13.         drupal_set_title("User Registration");
  14.         $form['#prefix'] = '<p>Lorem ipsum dolor sic amet.</p>';
  15. }

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.