ActiveSelect overrights default value

mlhess - December 11, 2007 - 22:30
Project:Active Select
Version:5.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Code sample
$fname = 'fieldname';
$form[$fname . 'prop' ] = array ( '#type' => 'select' ,'#default_value' => array($field['widget']['propname']), '#disabled'=>false, '#options' => $prop , '#title' => 'Via link type') ;
$form[$fname .'prop']['#type'] = 'activeselect';
$form[$fname .'prop']['#activeselect_path'] = 'activeselect';
$form[$fname .'prop']['#activeselect_targets'] = $fname. 'range';
$form[$fname .'prop']['#activeselect_extra'] = '';
$form [$fname .'range' ] = array ( '#type' => 'select' , '#options' => $nodes , '#default_value' => $value,'#title' => "Target page" ) ;

When this loads with javascript disabled it works, however, when it loads with javascript enabled, it over rights the default value of the range item, because the prop causes the activeselect ajax to fire.

Is there a way to pass the default_value into the ajax call, so that it can write it back out again?

 
 

Drupal is a registered trademark of Dries Buytaert.