Search code examples
drupaldrupal-7drupal-form-submissiondrupal-database

best practice of form page using drupal 7


Im really newbie with drupal 7 and I want to tests things with it:

I want to build a form page that will get information from users. for example workes that input FIRSTNAME, LASTNAME ID, PHONENUMBER and etc.. after that they will submit and it will enter to the workers db.

as I mention im really newbie with drupal. so first of all, where do I start? is form api is the best way to do it? secondly, the system create the workers db or I need to create a new db and table?


Solution

  • Why don't you use the standard Drupal Content Types. You can create a content type named worker and the have your workers add their info as you wanted.

    To create your custom content type:

    You can create your own custom content types by going to Menu > Structure > Content types > Add content type (admin/structure/types/add). You might do this as a way to organize your content. For instance, you might have "Info" and "News flash" as two simple content types on your site, rather than just using "Article" for both.

    Another alternative to use webform contributed module. It will give you the ability to create a from with fields of your choice.

    Webform also provides few features out of the box you might need to use. Like; Limiting number of submissions and unique fields.

    Finally, I'd suggest you can read Drupal concepts.