Hi guys... I have the following code:
<?php
// This function creates a container (fieldset) for each element:
//It is a custom hook
function _mymodule_item_container($oid, $uid, $username) {
$button_choose = drupal_get_path('module', 'mymodule') . '/img/choose-button.png';
$form['container'] = array(
'#tree' => FALSE,
'#type' => 'fieldset',
'#prefix' => '
',
'#suffix' => '
',
);
$form['container']['info'] = array(
'#type' => 'markup',
'#markup' => 'Element ' . $oid . ' -- Created by ' . l($username, 'user/' . $uid),
);
$form['container']['choose_button'] = array(
'#type' => 'image_button',
'#button_type' => 'button',
'#src' => $button_choose,
'#value' => $oid,
'#submit' => array('mymodule_record_choose'),
'#ajax' => array(
'callback' => 'form_node_voting_rebuild',
'wrapper' => 'container',
'effect' => 'fade',
),
'#prefix' => '
',
'#suffix' => '
',
);
return $form;
}
//NOW, I USE PREVIOUS FUNCTION:
//Creates a node form voting:
function mymodule_form_choosing($form, &$form_state, $node) {
if ($node->elements) {
if($node->help){