Here is what I do /*Code for timeLimits*/ if(isset($_SESSION['timeLimits'])) { $timeLimits = $_SESSION['timeLimits']; $i=0; $dropDownMenu = array(); $dropDownMenu['0'] = 'Configured'; foreach($timeLimits as $timeLimit) { $i++; $dropDownMenu[$i] = $timeLimit; } $this->optionsForMenu = $dropDownMenu; } else $this->optionsForTime = array(0=>'Not configured');
in your template select_tag('some tag',options_for_select($optionsForTime)); On Tue, Apr 27, 2010 at 4:03 PM, fRAnKEnSTEin <shirkav...@gmail.com> wrote: > hi, > > I have some data stored in session variable, what i need to do, is to > load that data in the select and radio button that i have in my > template. My template looks like: > > ... > <?php echo $form['cmb_adults_1']->render(array('class' => > "txt_boxes_peq")) ?> > <?php echo $form['rdb_rooms']->render(array('class' => > "class='radiobtn'")) ?> > ... > > how can i set the values of them bases on the session variable? i have > tryed several ways none of them worked, for example: > > <?php echo $form['cmb_adults_1']->render(array('class' => > "txt_boxes_peq"), array("default" => "3")) ?> > > Any ideas? > > Cheers > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en