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.
Form Builder - Pulldown fields
Re: Form Builder - Pulldown fields
Further to my previous note:
I changed it so that the value used is actually $this->Value and defined a variable indexSelected to pass rather than the -1. That way when there is an error in submission the form is re-displayed with previously selected values retained.
A.
I changed it so that the value used is actually $this->Value and defined a variable indexSelected to pass rather than the -1. That way when there is an error in submission the form is re-displayed with previously selected values retained.
A.