I should write a simple module (Not use WebForms) that make a form for get data.
But my the elements of my form didn’t show.
I use the drupal 6.0 doc but i don’t know what is wrong!
this is the link of my source code.
I get the error msg: warning: Missing argument 2 for registration_register_form() in /var/www/drupal/sites/all/modules/registeration/registration.module on line 29.
But i write the correct arguments.
You do not need to pass the
$formand$form_statein most* forms.Try this:
instead of:
Background:
drupal_get_formpasses any given parameters toregistration_register_form()but inregistration_all(), you don’t pass any extra arguments. (Just the callback of the form function).Note that you still need to pass
$formand$form_statein submit function asregistration_register_form_submit()uses $form_state’s data.*most cases:
if your form is a multistep form and the form changes on
$form_statevariable’s values, that’s a good use case that you do need to pass $form and $form_state toregistration_register_form()Update
After checking your code, I found many errors.
See new revision: http://pastebin.com/VNa3veFR (unlisted)
I have corrected most of the problems I could note. See inline comments and comment blocks above function names.