New Podcast

Posted Tuesday, January 31 at 3:28 pm
  Thomas Turnbull (tom_o_t on drupal.org) and Alan Palazzolo (zzolo on drupal.org) join Mike Anello to talk about their new book from O’Reilly Media, Mapping with Drupal. Mike’s usual co-hosts, Andrew and Ryan, were both unable to participate in the podcast, leaving Thomas and Alan subject to Mike’s long-winded (but extremely interesting by some accounts) questions.
Download Podcast 73
DrupalEasy_ep73_20120131.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Mike & Ryan's session on March 11th was a great intro to what DrupalEasy training is capable of teaching. From solid fundamentals and practices, to a complex, automated feed aggregator, everything was laid out in plain detail, so any skill level, from Beginner, to Ninja could have picked it up quickly. I am anxiously waiting the next session, and encourage anyone who wants to sharpen their Drupal knowledge to drop by a session, and get their learn on

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Topic “formapi”

Module Development: Disabled vs. Readonly Form Fields

One of the attributes that you can set for any form element using Drupal's FormAPI is "#disabled". This effectively disables the form element - in most browsers, the user actually sees the element "greyed out" and is unable to set focus on the element.

Submitting Disabled Fields

The "disabled" attribute for form fields is a great little user interface helper that you can use to help protect data from accidental changes. It locks down an HTML input form element so that it can be viewed, but not be changed. This is handy when displaying a form to a user where you need an extra layer of protection for the data.

What happens when the user goes to submit a form with disabled elements? The value of the disabled elements are not passed back to the browser - this can quickly turn into a data validation and/or submission issue.

Module Development: Adding Form Fields via AJAX/AHAH

Adding form fields to a Drupal form dynamically is not the most straight-forward task. You'll see this occasionally on a Drupal form (poll module jumps to mind) when there is an "add another" button that (seemingly) simply adds another set of input elements to the form. The big sticking point in setting this functionality up is doing it in a way that keeps FormAPI's security intact. Fortunately, there's some tips to get you mentally started.

Moving the comment form without hacking core

4.23077
Average: 4.2 (13 votes)

One of the most frustrating things about Drupal's current architecture is that comments, and the form to post them, are attached to nodes and don't easily allow you to move them around in your TPL files. There really should be an easier way to just place them anywhere you'd like. Most times this doesn't get in your way, until you want to do some fancy layouts where your content is split into multiple columns on the page.

Syndicate content