Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
While there is no documentation for this module, I am not sure in this thing.
After pressing the button, I would like to do some changes inside shown node, change title, change value of some field.
But I am not sure if this is not uselessly to use rules for that.
So I would like to perform my own php code by ajax, after pressing on this button. Is it possible?
Thanks
Comments
Comment #1
sprinkles CreditAttribution: sprinkles commentedThere are rule options to "modify node fields." Rules (I think) would be the best way to go unless you are wanting to write your own module.
Comment #2
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedCurrently this is not possible. I have thought about adding a hook to run on button field callback but I have not come to a decision. Rules should be able to handle your use case, and most use cases that I have been able to come up with.
Comment #3
firfin CreditAttribution: firfin commentedRules can handle these kind of actions.
So I guess this is not happening soon? If at all.
Comment #4
BassistJimmyJam CreditAttribution: BassistJimmyJam commentedSeems I never updated this issue, but I do believe it would be worth it to add a hook to invoke when a button field is clicked. I have tagged this issue 7.x as new features will be added to that branch first and (possibly) backported to the 6.x branch.