Altering ImageField Widget with FUpload enabled I need to alter the ImageField Widget so that I can add some fields other than the Description, Alt and Title fields. I'm able to do this when I select the file field widget type as Image Uplaod, but when I select the FUpload widget type, the changes don't take effect. Here's the code I'm using:

function bridge_widgets_imagefield_extended_widget($element, $extra_values) {
  // If you need the field or widget to conditionally add a FAPI field, use these.
  $field = content_fields($element['#field_name'], $element['#type_name']);
  $widget = $field['widget'];


   if( $element['#type_name'] == 'property_gallery'  ){
  global $user;
  user_load($user);
  return array(
    //This will Replace the Textfield with dropdown select for the description
    'revise' =&gt; array(
      '#type' =&gt; 'checkbox',
      '#title' =&gt; t('Revise This Description'),
       '#default_value' =&gt; isset($extra_values['revise']) ? $extra_values['revise'] : 0,
         '#attributes'=&gt;array('class' =&gt; 'revise-check')
       ),
    'revisedby' =&gt; array(
      '#type' =&gt; 'textfield',
      '#maxlength' =&gt; 64,
      '#title' =&gt; t('Revsied By'),
     '#default_value' =&gt; ($extra_values['revise']==0) ?  NULL : $extra_values['revisedby'] ,
       ),
       'revisedon' =&gt; array(
      '#type' =&gt; 'date',
      '#title' =&gt; t('Date'),
     '#default_value' =&gt; ($extra_values['revise']==0) ?  NULL : $extra_values['revisedon'] ,

       ),

  );
  }
}
I guess it is the line

$element['#type_name'] == 'property_gallery'


that makes your changes have/not have effect.

I would actually suggest writing a new widget alltogether, instead of altering the existing one(s). It isn't that difficult, but I don't know of any good tutorial for it online – there is a good chapter about it in the book "Drupal 7 Module Development" though, which helped me a lot.

If you find a good online tutorial, please post the link!