Let me take you on a journey. We'll pass by Drupal content renderer services, AJAX commands, javascript libraries and a popular front-end framework. If you've only heard of one or two of those things, come lean on the experience I took diving deep into Drupal. I'm pleased with where my adventure took me to, and maybe what I learned will be useful to you too. Here's the end result: a contact form, launched from a...
Part 1: Make the link work without javascript In this example we have a table listing log entries of some kind. We want to put a delete link against each log entry allowing the administrator to delete the log entry: The following code is responsible for printing out each link onto the page: $query = array( 'tok' => drupal_get_token('delete_log_item' . $flid), ) + drupal_get_destination(); $output[] = l(t('Delete'), 'admin/my-custom-log/delete/' . $flid, array('query' => $query)); The callback...