Blog Archives

Appending Language to Menu Items in Menu Admin (Drupal 7)

If you are working with a Drupal 7 menu that contains menu items across multiple languages it is a little cumbersome to see them all on the same screen. Right now we have all of the translations in place (3

Tagged with: , ,
Posted in Development

Allowing Users to Cancel Their Own Commerce Licenses

UPDATE: I’ve written a contrib module called Commerce License Cancel to get the ball rolling to make this a community effort. Read on if you’d like to see how I got there. There’s been some talk in the issue queue

Tagged with: , , , , ,
Posted in Development

Drupal AJAX Framework with Multiple Instances of a Form

I recently encountered a unique issue with AJAX-ified form elements in Drupal. We’re building a site that shows the same form twice on a single page. I’m rendering both forms in two separate blocks; one appears at the top of

Tagged with: , ,
Posted in Development

Overriding Image Field Attribute Forms

Another quick example for you… Here’s what the default image field form looks like, if you have enabled alt and title attributes: One way to modify the titles and help text (descriptions) of the Alternate text and Title attributes here

Tagged with: , , ,
Posted in Development

Quick Tip: Adding a Reset button to a Drupal form

Using hook_form_alter or hook_form_FORM_ID_alter one can easily add a “Reset” button to a Drupal form. In this example we’re actually trying to reset anything the user typed after the form loaded. This will not remove the default values. Here’s a simple example (Drupal 6)

Tagged with: , , , ,
Posted in Development

Drupal Commerce Add To Cart Form Tweaks / Registration Improvements

In this example I’m showing how to improve the Add to Cart button for Drupal Commerce products to show differently based on whether or not users have already purchased a product, or whether the product is already in their cart.

Tagged with: , , , , ,
Posted in Development

Views Exposed Filter: Terms for current language only

I’ve been working on a multilingual site that has a product finder. We have 3 exposed filters that allow a user to select an Activity, IP Category, or Industry. All of these filters are Taxonomy Term filters. Some of the

Tagged with: , , , , ,
Posted in Development

Proximity by City or Zip Code in Drupal 6 with Location and Views

The location module for Drupal 6 is a robust module. On most projects, it gives us 100 percent of what we need. Proximity searching based on zip code is built-in and fairly painless to setup. I’ve recently been tasked to also allow

Tagged with: , , , , , , ,
Posted in Development

Webform for Campaign Monitor

Webform is an amazing module. Thankfully, you can extend it to make it even more helpful. We’ve had a lot of clients that offer a “Join Our Mailing List” type of functionality on their sites. These forms are typically one or

Tagged with: , , ,
Posted in Development

Disable Specific States in Ubercart

Here’s a quick example that illustrates how to remove a few State/Province options from the billing and shipping panes of the Ubercart checkout form, as well as the order edit/create form. Please understand there are other ways to do this (like altering the united_states_840_1.cif file and

Tagged with: , , ,
Posted in Development