Skip to main content
stopopol's user avatar
stopopol's user avatar
stopopol's user avatar
stopopol
  • Member for 8 years, 4 months
  • Last seen this week
  • Austria
awarded
Loading…
accepted
answered
Loading…
comment
Custom module - find out the name of the field
Maybe I should also add that my costume function to access the database is triggered by a node_form_alter function
comment
Custom module - find out the name of the field
I've been going through the documentation for the form_state (api.drupal.org/api/drupal/includes!form.inc/function/…) and I was able to get things like the form_id from it, but not the machine_name of the field. Do you any other clues for me?
Loading…
Loading…
awarded
comment
Custom submit handler is also called when deleting a node
I guess I missunderstood you answer at first: renaming the other function to function b2share_form_node_form_alter(&$form, &$form_state, $form_id) { $form['actions']['submit']['#submit'][] = 'seal_the_deal'; } did the trick
comment
Custom submit handler is also called when deleting a node
Thank you for the input. I removed that line, but still can't delete any nodes.
comment
Custom submit handler is also called when deleting a node
Unfortuntely, no. I called it: function seal_the_deal($form, &$form_state, $entity_id, $entity_type) {...} and it's still called when trying to delete a node.
Loading…
comment
Custom ajax widget can't save generated value to database - $item always zero
Not quite. I can call the submission_handler and partially fill the database, but I'm not quite there yet. I will post the final solution as an answer.
revised
Loading…
revised
Loading…
revised
Loading…
comment
Custom ajax widget can't save generated value to database - $item always zero
And what does that mean exactly? Every function in the code is called. Everything seems fine as far as I can see, except for $items.