I'm using viewfield.module v 1.3.2.9 2007/07/10 23:07:25, pulled down from cvs. I know it's not 100% stable, but it works really well - this is an awesome tool when combined with node reference!

However, I can't seem to get the force default checkbox to save a "true" or "checked" value and I'd love to get viewfield off my edit form. Any thoughts? I just upgraded from v 1.2, not sure and ran the upgrade script. Below is an export of my field - as you can see, it won't save a value for force default:

$content[fields]  = array (
  0 => 
  array (
    'widget_type' => 'viewfield_select',
    'label' => 'Projects Detail',
    'weight' => '0',
    'force_default' => '',
    'description' => '',
    'group' => false,
    'required' => '1',
    'multiple' => '0',
    'allowed_views' => 
    array (
      'projects_of_specific_nepa' => true,
      0 => 1,
      'listing_activities' => false,
      'listing_contractors' => false,
      'listing_nepas' => false,
      'listing_projects' => false,
      'listing_surveys' => false,
      'comments_recent' => false,
      'frontpage' => false,
      'popular_alltime' => false,
      'popular_recent' => false,
      'tracker' => false,
    ),
    'super_default' => 0,
    'super_default_widget' => 
    array (
      0 => 
      array (
        'field_projects_detail' => 
        array (
          'vnames' => 'projects_of_specific_nepa',
          'vargs' => '[nid]',
          'override_default' => true,
        ),
      ),
    ),
    'field_name' => 'field_projects_detail',
    'field_type' => 'viewfield',
    'module' => 'viewfield',
  ),
);
CommentFileSizeAuthor
#1 viewfield.module-177065.patch860 bytesdarren oh

Comments

darren oh’s picture

Version: 6.x-1.x-dev » 5.x-1.2
Status: Active » Reviewed & tested by the community
StatusFileSize
new860 bytes

This bug was caused by a simple typo.

aren cambre’s picture

Just to make sure, with this feature, can I create a viewfield on an existing content type, specify the default value for all existing nodes of that content type, and then have no need to edit each node for it to take that value?

In other words, my experience with 1.2 is that existing nodes will not "inherit" the default viewfield values unless I edit and save the fields. With this, can I specify a viewfield with default values that "just works" on all existing nodes without further intervention?

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

I committed this a few days ago.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.