Create self-populating ajax drop-down forms in Drupal with the Form API

Hello! At risk of making the title of this post a mouth full, I thought I’d share some of our experience with interacting with Drupal’s Form API (Specficially Drupal 7.x). There is a lot of documentation on different ways you can interact with the Form API to accomplish a wide range of tasks from collecting information, processing information or building complex search queries. The latter is where we ventured in our most recent work interacting with Drupal’s Form API. We worked on a project where the requirement was to build a drop-down based filtration system where content category choices in the drop-down boxes would auto populate dependent taxonomies based on the relationship of the taxonomies , content fields and content in general. After choosing all the drop-down boxes, the end-user would then be able to click a “Go” button to build a list of results that apply the selected filters. […]

Drupal Development : Make a page template for dynamic page requests

Hello! Drupal is a fantastic content management system with an even more fantastic development community. Recently through our own Drupal development projects, we came across a scenario that required the processing of dynamic (i.e. “Wildcard”) page requests to the same drupal page template. If I’ve lost you already , don’t worry! All we are trying to do is ensure the following page request scenarios are served by the same page template : drupal-site.com/page1/randomrequest1 -> page–page1–wildcard.tpl.php drupal-site.com/page1/randomrequest2 -> page–page1–wildcard.tpl.php You can see in the two above scenarios, that the “page1” root request URI is the same, but the subsequent URI requests , “randomrequest1” and “randomrequest2” are different. What happens if you want to use the same page template for both random requests? Easy, you implement a check in the preprocess page hook in template.php! In your drupal theme, you will have a file called template.php. This is where all the pre, […]