Created
          January 16, 2013 12:35 
        
      - 
      
- 
        Save ss81/4546841 to your computer and use it in GitHub Desktop. 
    Drupal 6/7. Set one error message for several form elements.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $msg = t('Your message here.'); | |
| form_set_error('field_shopdata_paypal][0][value', $msg); | |
| form_set_error('field_shopdata_paypal_fname][0][value', $msg); | |
| array_pop($_SESSION['messages']['error']); // Remove doubled mesage. | |
| form_set_error('field_shopdata_paypal_lname][0][value', $msg); | |
| array_pop($_SESSION['messages']['error']); // Remove doubled mesage. | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment