Hi all,

I want to create a content type to create a demo page for a number of programs I wrote.
I want to create a new content type as I've many of these programs and for each of them
I need to specify an list of inputs, all different.

Ideally the node created by this content type will be a form to select an item from a dropdown
menu and a "submit/run" button to run the cgi. The if I've javascript, the result could be displayed
directly on the page, otherwise the page would need a reload.

Here I've two problems:

The first one is that I don't know how to create the dropdown . All dropdown modules in cck
allow the user to select from a dropdown with a fix number of items while creating the node. What I want is
a field that would let me input the elements while creating the node and the show the dropdown
when the node is displayed.

The second is that I don't know how to transform a node created by cck in a from that I can
use to run my cgi ... and here I really have no idea if this is possible. If I use the cck button module,
I guess I can easily run my cgi asynchronously and then collect the result with javascript, but this
design would not work if js is not enabled...

help :)

Comments

nevets’s picture

When you create a field that is some form of select list, toward the bottom of the second page (or edit page) is an input labeled 'Allowed values list:'. If you look below that you will see a label 'PHP code'. click that and a second text box opens where you can provide PHP to generate the list values.

As for the second part, I have no idea, I would have written a "demo" module that implemented the form with the forms API.

munga’s picture

but now I've a new problem !

http://drupal.org/node/179198