Skip to main content

Posts

Showing posts from December, 2014

Drupal 7 How to add a button act like "Clear all caches" in the custom form in custom module? OR Example for button act like "Clear all caches" in the custom form in custom module.

This Docs help you to understand How to add more than one submit button in a single Drupal 7 Custom form in Custom module? More than that How to add a button act like "Clear all caches" in the custom form in custom module? Please find the following code, will help you to achieve this.  In the code we do have implemented hook_menu(). After enabling this code in your custom module you can go to the page where it appearing the form, here the path is " example/extrabutton_form", You can see two buttons like ' View my username ' and ' View my user ID ' , By clicking this  button it will perform certain action and show the respective result. This how the "Clear all caches" button works.