I wish to create a computed field that is a button that processes info related to node when clicked. I used the first example from the README.txt :

    In your computed field's configuration:

    - Computed Code:
    // ensure the node has an id by saving it if it is new.
    if (!$node->nid) node_save($node);
    // store the nid in our computed field
    $node_field[0]['value'] = $node->nid;

    - Check 'Display this field'

    - Display Format:

           $form['submit'] = array('#type' => 'button', '#value' => t('Sign up') );
           $form['#action'] = url('lesspaper/process/' . $node_field_item['value']);

           $display = drupal_get_form('sign_up', $form);

    - Uncheck 'Store using the database settings below'. You could store this if
      you wanted to, but it's not costly to compute this field and is already
      stored in the node table. One reason why you may want to store it is if you
      want the value available to Views. 

But, it's not working. Getting a "callback" error. Any suggestions?

Comments

colan’s picture

Status: Active » Closed (won't fix)

Version 5 is no longer supported.