We have added two event listeners for Action Buttons Update Record action.
update-record-success event with field values is triggered after getting a response with a success status. update-record-failure event is triggered after getting a response with an error status.
window.addEventListener('update-record-success-list1', (e) => {
// e.detail is an object with updated field names and values
console.log('update record success', e.detail);
// update record success {
// payload: { "Full Name": "Softr" ... },
// id: "rec123456"
// }
});
window.addEventListener('update-record-failure-list1', (e) => {
console.log('update record failure', e.detail);
// update record failure 'Email field is required.'
});
// To reload the page after record update on #list1 block
window.addEventListener('update-record-success-list1', () => {
window.location.reload()
});
For âadd recordâ action buttons, should I use âsubmit-form-success-formXâ and âsubmit-form-fail-formXâ as event listeners or âadd-record-success-listXâ and âadd-record-success-listXâ?
hi @artur thanks for looking into this. I would like to add stuff like calling fathom events or make.com webhooks etc when someone clicks on a button (mouse over might also be an interesting event). Ideally the generic list click (not the action button) would also have a selector. Thank you!
Hi, would it be possible to have event listeners for Open URL action buttons on list block ?
I use webhooks URLs from Make and would like to use custom code to add logged-in user data (email and full name) in the data sent to Make.
@artur +1 for Open URL action buttons. This may already be implemented, but Iâm not having any success with it. I have a similar situation as @Hippo, using the Open URL action button send activate a webhook handler that triggers an Airtable automation. Would like a somewhat simpler solution to notifying the user via toaster message on success of the action.
Could these event listeners also be used for password update button success? That would be super helpful since I use a modified profile block to prompt first time users to update temporary password to something secure. The issue is when they click update password, literally nothing happens. Would be SUH-WEET if I could trigger my confetti on password update success!!!
I also really need to somehow capture the clicks on an âOpen external URLâ button or combine two actions into one button - update record and open URL.
Any ideas how to do this?
Itâs for tracking how many people apply to jobs via our platform