Form Builder - Pulldown fields
Posted: Sat Dec 29, 2007 10:55 am
Hi,
Just a bit of input in case it is of interest.
I wanted to actually select the first value in my list rather than add one to the front of the list resulting in [unspecified] if the field was not changed. That is, I wanted a default value.
So in the file PulldownField.class.php (under modules\formbuilder\classes) at line 113 I made the following change:
// $sorted = array(' '.$this->GetOption('select_one','')=>'') + $sorted;
$this->Value = ''; //cwf mod 20071229
This seems to do the trick.
I guess it could be made more controllable in case different behaviour is needed elsewhere, but this suited me.
A.
Just a bit of input in case it is of interest.
I wanted to actually select the first value in my list rather than add one to the front of the list resulting in [unspecified] if the field was not changed. That is, I wanted a default value.
So in the file PulldownField.class.php (under modules\formbuilder\classes) at line 113 I made the following change:
// $sorted = array(' '.$this->GetOption('select_one','')=>'') + $sorted;
$this->Value = ''; //cwf mod 20071229
This seems to do the trick.
I guess it could be made more controllable in case different behaviour is needed elsewhere, but this suited me.
A.