Hi there
I am using Drupal 4.7.0 beta 4.
My site uses PHP within nodes, which is working fine up until now.
I want to be able to use a form within one of these pages. But using the example from the forms API, can I do something like this?
When I don't use the function, the form displays, when I do something like that below, nothing happens.
Also, how would I get the submit thing to work if I am planning to do everything within a PHP node?
Thanks very much
D
======
<?php
test_page();
function test_page() {
// THIS IS THE EXAMPLE FROM THE FORMS API
// Access log settings:
$options = array('1' => t('Enabled'), '0' => t('Disabled'));
$form['access'] = array(
'#type' => 'fieldset',
'#title' => t('Access log settings'),
'#tree' => TRUE,
);
$form['access']['log'] = array(
'#type' => 'radios',
'#title' => t('Log'),
'#default_value' => variable_get('log', 0),
'#options' => $options,
'#description' => t('The log.'),
);
$period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');
$form['access']['timer'] = array(
'#type' => 'select',
'#title' => t('Discard logs older than'),
'#default_value' => variable_get('timer', 259200),
'#options' => $period,
'#description' => t('The timer.'),