Hello, we have an action link button that when pressed sends an email. I’d like add a script that when the action link button is pressed, a sound is made. Below is a script that @Sunny_Singla created for when a user presses submit button a sound is played.
check “Knack” page and click action link and when you click on sound it will play sound after action.
below is the code
// Acion link sound
var isactionpressed=0;
$(document).on(‘knack-view-render.view_179’, function (event, view, records) {
if(isactionpressed==1)
{
var audio = new Audio(“https://cdn.pixabay.com/download/audio/2022/03/16/audio_492840191c.mp3”);
audio.play();
}
isactionpressed=0;
});
This happens a lot if code isn’t posted as code in the forum. When copying code always check the quotation marks are correct. The first time I did it, it took quite a while to figure out.
I would suggest copying code into vsCode or other JavaScript editor first.