Hi Stackoverflow community,
I am creating a voting system with many categories using the FormAPI.
I built the form with drupal_get_form() and stored the html markup into a textarea in a CCK field. I also built the submit function which deals with the database.
However, when I display the node, the form can be construct however, the submission function is not called. I can't figure out the source of the problem. Any advice is appreciated, thanks!
*EDIT:
Defines the form:
function judges_nodeapi(&$node, $op, $teaser, $page) {
switch ($op) {
case 'view':
...
$node->field_judging_form[0]['value']=drupal_get_form('judges_entry',($node));
node_save($node);
}
}
function judges_entry($form_state, $node){
...
return $form;
}
Then I'm simply using CCK to display the form as plain text.