[drupal-support] Secondary submit form

Kobus Myburgh ITBJDM at puknet.puk.ac.za
Thu Sep 29 13:32:59 UTC 2005


Hi,

I am busy writing a module to do the following:

1. Administrator creates a topic that invites entries on the topic, e.g. 'Name your most embarrassing moment'. He then sets the closing date for the topic to some date in the future.

2. If the closing date is still not reached, a link is placed underneath the node (in this case called topic). This is working correctly depending on the value of 'topicopen'.

3. If the visitor clicks on 'submit entry' link, it must open up a form that accepts this visitor's 'most embarrassing moment' and associates it with the topic by means of $node->nid.

4. While this topic is open, the visitor can go back and edit his entry over and over if he likes. Any other visitor can do the same to his own individual topic, but may not see another visitor's reply.

I am at a loss at how to do this - do I need two modules? Can I do it in one module? I assume this would be similar to comment.module, but it is way too advanced for my Drupal coding skills, so I am unsure of how to proceed. I like to learn new things myself, and I tried this, but I couldn't get this working.

I believe the link should be something like: submission/x/y, where x has to be the $node->nid for association, and y the $user->uid, to ensure that the correct user ID can add/edit/view only his own entry. If this is indeed the correct approach, how do I go about implementing this? Anybody care to give me a sample code snippet or some more info?

Any help would be greatly appreciated.

TIA,

Kobus




More information about the drupal-support mailing list