Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14625 reviews 1734 hosting providers

Questions & Answers

Drupal 7/Adding data in custom tables

Oct 23, 2013 by carebare
Hello
I want to create a form and then save the form’s data into my Drupal 7 database custom tables. Is this possible ? and if so, how can I do it?
Any help on this will be highly appreciated
Many thanks in advanced

1 Answer

0 votes
Oct 23, 2013 by RalphK
This is possible.
1. You will first have to create a customized module and then create the database tables inside a .install file. You can do this using hook_schema.
2. Now, in your .module file, make your own form that will save the entered values to your tables in the submit function. The bellow links will explain more about this
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_schema/7 https://api.drupal.org/api/drupal/includes%21form.inc/group/form_api/7