content type "custom data" I have created a content type that has a "number of accepts" field. I want to add a button, "accept", to the content type. When a user clicks it, it will temporarily store their username and etc. Depending on the number of accepts field, the content type will display "1/10 Accepts" for example. How would I be able to do this and have the number of accepts displayed in realtime. thanks!!
You can create using hook_form_alter() and I get my button on the Add/Edit node form:

$form['actions']['accept_and_adduser'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; 'Save &amp; Add a Lesson',
  '#name' =&gt; 'op',
  '#submit' =&gt; array('mymodule_node_form_submit'), /* NEED this */
  '#weight' =&gt; 1000
);


But, clicking the button doesn't seem to hit hook_node_submit() or hook_node_insert(). I'm assuming I'm missing a hook or something in the button creation...anyone have any ideas?

Then added this function:

function mymodule_node_form_submit($form, &amp;$form_state) {
  // Do stuff before saving the node, saving the data of users in some table and calculate it

  // Call this to save the node
  node_form_submit($form, $form_state);

  // Do stuff after saving the node
}