I have used hook_schema() in my module to create a custom table in the Drupal database - the data is unrelated to anything in Drupal.

I would like administrators to be able to insert, update etc. records in this custom table. I had thought to use the function hook_form() for this, but upon closer inspection this hook relates back to nodes. My custom table has no relation to nodes.

Is there a different function I should be using?

  • First, there is not one hook for that. Second, what Drupal version are you using? Because form api changed quite a lot.
    – Mołot
    Commented Dec 22, 2015 at 15:16
  • My module is for Drupal 7
    – gretzo3829
    Commented Dec 22, 2015 at 15:30

1 Answer 1


You don't need to call any special hooks. You just need to create menu items for insert/edit/delete/list of data.

Here is an example module that create basic crud using custom table.

If you want to create listing with views instead of custom listing callback function you will need to use view_api and hook_views_data in your module for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.