The Web Mechanic

Welcome to the Web Mechanic!

My name is Matthew McKinzie, and the Web Mechanic is my web development blog. The blog posts here cover challenges I've faced in web development as well as other interesting issues I've found. I hope you find something useful here.

If you are interested in anything you've read here or would like to hire a freelance web developer, feel free to contact me on my Contact page.

For code samples and a portfolio of sites I've built, please check out my bio page.

Credit to Michael Dziedzic and Alexander Sinn for header images.

Web Mechanic Blog

Loading Form Definition Include Files in Drupal 7

This post was written 06/12/2015 and was migrated over from my Drupal 7 site, which is now offline.  Because of that, certain demonstrations in this post may not be functional.

Recently I had to include a form within an existing set of nodes (using hook_node_view), and this form had to make an AJAX callback. I put the form definition and Ajax callback function in a separate file for convenience. From my_ajax_test.module:

Tags