Drupal Forms

Clear Drupal caches with PHP

• Clear the Drupal 6 & 7 caches with PHP via a small form.
• Drop the following Drupal 6 or 7 PHP in a node or block w/ proper permissions.
• Use at your own risk.

Drupal 7 Form in a Block or Node w/ PHP

A simple Drupal 7 Form in a Block example.

  • w/ basic form function
  • w/ validation and submission functions
  • errors return to the block area itself as well
  • note: Drupal 7 Form API ref
  • to remove error message from appearing w/in the element; remove the 2nd line w/ $temperrors and the following IF statement that uses it.

Alright Boys! Paste this PHP code into your block to get started:

Subscribe to Drupal Forms