Can I create a form in a node, or do I have to do something cleverer?

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.'),

Insert a swf in my webpage with relative path

Hi,

I have a little problem, I have a code like this:

What is "referenced by" in user profile...

I have just installed the latest version of 4.7 and like what I see. I decided to go with 4.7 to minimize upgrade issue later. One thing however, what is the "Referenced By" display in the user profile page. Currently mine says "u u"? Is this a bug in the latest CVS? Oh, and also in the edit screen it say "r" -> account settings. Another bug?

Cheers

What are the links for attachements?

How can I make a link inside the node content to point to attachement?
I need some module, so it would be possible to make links like this

<a href="/[my-file.exe]">[my-file.exe description]</a>

or this

<img src="/[my-file.exe]">

weblink module for 4.7

Will the weblink module from http://drupal.org/project/weblink also run with drupal 4.7.b4 ?

with kind regards, holger

Drupal styles and Netscape 6.2.1 issues.

Have found that Netscape Navigator 6.2.1 has issues with almost any Drupal themes (or might say with Drupal core styles). Looks like it doesn't support display: block style, thus doesn't show (!) any content that have forms (or maybe smth more) in it.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x