Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8713759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:25:00+00:00 2026-06-13T05:25:00+00:00

I should write a simple module (Not use WebForms) that make a form for

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:25:01+00:00Added an answer on June 13, 2026 at 5:25 am

    You do not need to pass the $form and $form_state in most* forms.

    Try this:

    function registration_register_form(){
    

    instead of:

    function registration_register_form($form, &$form_state){

    Background: drupal_get_form passes any given parameters to registration_register_form() but in registration_all(), you don’t pass any extra arguments. (Just the callback of the form function).

    Note that you still need to pass $form and $form_state in submit function as registration_register_form_submit() uses $form_state’s data.

    *most cases:
    if your form is a multistep form and the form changes on $form_state variable’s values, that’s a good use case that you do need to pass $form and $form_state to registration_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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to write (simple) LINQ to Entities query that groups elements by some attribut
I know I should write this in Vb.net but for my own reasons I'm
i want to upload the sound file (.ogg) in server. But it should write
What rule should I write for redirection in htaccess so that http://abc.com/http://xyz.com/path/ redirects to
I know it's not Pythonic to write functions that care about the type of
Here's some simple code that, for each argument specified, will add specific get/set methods
I'm working on (what should be) a simple script that will add text to
Should there be any specific order in which I should write the following for
I have some child processes which should write some logs into a common file.
I'm trying to create async api with Goliath framework. Service should write to mysql,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.