This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Forms API: "#disabled" attribute does not disable form elements

I am trying to make a textareas and textfields disabled and grayed out so that they cannot be edited by the end user. I am attempting to use the "#disabled" attribute as mentioned at:

http://api.drupal.org/api/HEAD/file/developer/topics/forms_api_reference...

The code snippets I am attempting to use are:

  $form['basics']['show_funding'] = array
  (
    '#type' => 'textfield', 
    '#title' => t( "Funding" ), 
    '#required' => TRUE, 
    '#default_value' => $customParts['show_funding'],
    '#weight' => -3,
    '#disabled' => TRUE,
    '#description' => t( "How much money are you asking for?" )
  );
    $form['textArea'][ $fieldName ] = array
    (
      '#type' => 'textarea',
      '#rows' => 5,
      '#title' => $fieldTitle,
      '#required' => FALSE,
      '#default_value' => $blurb['body'],
      '#weight' => $blurb['weight'],
      '#disabled' => TRUE
    );

I have tried to insert 1, TRUE, and "disabled" into the "#disabled" attribute, all to no avail. I have scoured the documentation and Drupal support forums and found no mention of this issue. I am running Drupal 4.7.4 Any help is appreciated.

~ Alicia K

A small enhancement to the nodequeue module

I have developed a small enhancement to the nodequeue module which allows you to rotate a queue by moving the last element to the first. Please comment on it.

Automated creation of a group on account creation

Hi guys,

I'm a php programmer by trade and have built a few drupal-based sites in the past. Now I'm looking into drupal modules in more depth.

What I need to do is create an organic group when a new 'client' user account is created. This group will eventually have other users of role 'employee' assigned to them, although this will be done manually by the administrator. The roles stuff I can work out, it's the creation of the organic group where I am having difficulty.

I need help with making long pages into smaller ones with Paging.

Hello!

I am new to Drupal, and I am loving it so far, and I need help with Paging. I am making a photoshop tutorial site, and I need to make the tutorials into steps for a couple of reasons. I got the paging module, and I put the module, and css that came with it into the modules folder.

I also enabled it in the module section, and I included the

in my page. It is not working for me, and I cant seem to figure out why.

Here is the link to the tutorial;

Does this work? CCK fields visibility by role?

Hi,

just looking at CCK and contemplate again and wondering if there's a feature or enhancement already to VIEW certain fields (or groups) just by user-role or enable/disable that via a single custom privilege

I'd need only a simple scheme

- normal users
- admin users (they see all the fields)

Your help is appreciated

Christoph

moving to clean urls

I've got a site that's been running for a while without clean urls. Some of the urls are hard-coded with ?q=. If I move to clean urls will the old urls still work meaning some urls will be clean and some will still be '?q='? I don't want google links or bookmarks to break if I move to clean urls.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions