[Solar-talk] Multiple select forms problem

Kilbride, James P. James.Kilbride at gd-ais.com
Tue Mar 4 17:00:51 CST 2008


Btw folks. The problem is in the getValues which seems to call a
_populate whenever the $src is an array. But the multiple select creates
an array within the array so it recursively goes down into it and then
doesn't set the values correctly because of that.

Paul or somebody, check Solar_Form::_populate($src, $elem = null) to see
what I'm talking about.

James Kilbride 

-----Original Message-----
From: solar-talk-bounces at lists.solarphp.com
[mailto:solar-talk-bounces at lists.solarphp.com] On Behalf Of Cruz, Darwin
Sent: Tuesday, March 04, 2008 2:54 PM
To: solar-talk at lists.solarphp.com
Subject: [Solar-talk] Multiple select forms problem

I'm trying to create a multiple select form in my php application but
i'm running into the paroblem that the form selections are not being
saved when the user selects the options.  Am i doing something wrong in
my decleration?  Is anyone else having this problem?

When the  	$myForm->getValues() method is called, does the returned
value of the multiple select form an array?

Thanks?

$myForm = Solar::factory('Solar_Form');

$myForm->setElement('selectOptions', array(
  			'type'  	=> 'select',
  			'label' 	=> 'Shipping Reason:',
  			'options' 	=>
array('One'=>'One','Two'=>'Two','Three'=>'Three'),
  			'require' 	=> true,
  			'attribs'	=> array(
  				'multiple' =>true
  				),
			));

_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk



More information about the Solar-talk mailing list