Would like to execute custom js when the button is clicked.

Is this possible currently?

Comments

BassistJimmyJam’s picture

Assigned: Unassigned » BassistJimmyJam
Status: Active » Needs work

This is not currently possible. The displayed field simply uses the click event and returns false to prevent the default event from firing. Since the field returns false you will not be able to reliably bind to the click event yourself. I will add this to the list of requested features.

BassistJimmyJam’s picture

Status: Needs work » Closed (won't fix)

Drupal 7 supports custom ajax commands that could be used to accomplish this. You would need to create a custom rule to add the action to the response or wait for #1327094: Invoke hook on button field click and add it in a custom module. As a result, I will not be adding this feature to either the 6.x or the 7.x branch.