Closed (fixed)
Project:
Signup
Version:
6.x-1.0-rc6
Component:
Themeability
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2009 at 21:30 UTC
Updated:
7 Dec 2009 at 18:36 UTC
I'm trying to add a custom validation step to the themed signup form, but as far as I can tell, my validation call back isn't getting called (for testing, I've hardwired it to set an error if it's called, and signups are going through without an error).
To call the validation call back, I have put this line in the bottom of theme_signup_user_form, immediately before return $form
$form['#validate']['signup_form_data'] = 'theme_signup_user_form_validate';
Should this work, or do I need to do this another way?
Thx,
Ellen
Comments
Comment #1
awolfey commentedYou need to do this in a custom module with hook_form_alter() for form with id == signup-form:
$form['#validate'][] = 'mymodule_signup_validation';
Then do your validation in
function mymodule_signup_validation(&$form, &$form_state) {
do stuff;
}
Comment #2
joachim commentedGoing to mark this as closed as the question's been answered.
This may also be of interest: #29568: Flexible number and type of fields.