hi all,
i want to create a small wizard that will, at the end, create events & pages.
Im trying to create a php page for the wizard, im I wrong?
I never used the Drupal API, and i can't find a simple howto (or can't i search?)
My ressources includes, in addition to the API, http://jeff.viapositiva.net/drupal/dynamic-forms and some other page found through google.
I managed to get the first page showing, but i can't get to the second one. Here's the code i have:
<?php
function myform($form_values=NULL) {
if (!isset($form_values)) { $step = 1; }
else { $step = $form_values['step'] + 1; }
$form['step'] = array(
'#type' => 'hidden',
'#value' => $step,
);
switch ($step) {
case 1:
$form['section']=_taxonomy_term_select('Section', 'taxonomy', 0, 3, NULL, 0, NULL);
$myyear=date('Y'); $month=date('n');
if ($month > 7) {
$quadris=array(0=> $myyear."-".($myyear+1)." quadri 1", 1=>$myyear."-".($myyear+1)." quadri 2");
} else {
$quadris=array(0=> ($myyear-1)."-".$myyear." quadri 2", 1=>$myyear."-".($myyear+1)." quadri 1");
}
$form['quadri']=array('#type' => 'radios',
'#title' => 'Quadri',
'#options' => $quadris,
'#default_value' => isset($form_values) ? $form_values['quadri'] : 0,