Recent Topics

1 Mar 28, 2015 01:57    

i would like some help with a form. I would like to go to a url based on the selection made from a form option list, except it must submit the form on selection change:


$Form = new Form(.......
$Form-select_options('', array_to_option_list($array), '', array('onchange'=>'this.form.submit()');

Any suggestions would be appreciated!

2 Mar 28, 2015 02:28

Answer:

$Form = new Form();
$Form->begin_form( 'some_name' );
$Form->select_input_array( '', '', $array, T_('Label'), '', array(
		'force_keys_as_values' => false,
		'onchange' => 'window.location.href="'url" + this.value'
	) );
$Form->end_form();

4 Mar 28, 2015 13:42

@mgsolipa it seems I am getting good at it too... I suppose it might help another soul dbn the line... (:


Form is loading...