Hello ,
I am putting together a contest module which allows administrators to dynamically generate contest forms .I have
I am experiencing the following problem..
1. When an administrator selects a contest from a select box it does not auto populate a select box of contestants
2. The contest selected is not shown after the form is submitted
3. Curiously it is not showing the fieldset for the page.
When you look at the $form after the form is posted you can see that the $form is constructed correctly , so it looks as though the $POST is cancelled and the page is simply loaded again.
Here is the form for the page ...
function _admin_sfx_contest_edit_form_3() {
$contests = _sfx_contests_get_contests($live='Y') ;
$default_value = ( $_POST['sfx_contest_id'] && ($_POST['sfx_activity'] == 'DEACTIVATE_CONTESTANT') ) ? $_POST['sfx_contest_id'] : 0 ;
$form['sfx-contest-edit-deactivate-contestant'] = array(
'#type' => 'fieldset',
'#title' => t('Deactivate a contestants entry'),
'#collapsible' => TRUE,
'#collapsed' => FALSE
);
$form['sfx-contest-edit-deactivate-contestant']['sfx_contest_id'] = array(
'#type' => 'select',
'#options' => $contests,
'#default_value' => $default_value ,
'#attributes' => array('onchange' => 'this.form.submit()' ),
'#DANGEROUS_SKIP_CHECK' => TRUE,