You do not need to pass $form and $form_state in most * forms.
Try the following:
function registration_register_form(){
instead:
function registration_register_form ($ form, & $ form_state) {
Background: drupal_get_form passes any given parameters to registration_register_form() , but you do not pass any additional arguments to registration_all() . (Only form function callback).
Note that you still need to pass $form and $form_state to the submit function, since registration_register_form_submit() uses the data of $ form_state.
* in most cases: if your form is a multi-stage form and the form changes to the values โโof the variables $form_state , which is a good use case that you need to pass $ form and $ form_state to registration_register_form()
Update After checking the code, I found many errors. See New Edition: http://pastebin.com/VNa3veFR (not listed) I fixed most of the problems that I could notice. See Inline comments and comments on function names.
source share