Can anyone help with a way to play a sound via the speakers when a submit is pressed with a certain result ticked on a form?
thanks
Andrew Steele (UK)
Can anyone help with a way to play a sound via the speakers when a submit is pressed with a certain result ticked on a form?
thanks
Andrew Steele (UK)
Thanks for the advice Sunny, We'll have a look at that method :)
Ā
HelloĀ Andrew,
Ā
Yes possible using JavaScript.Ā
for example upload a mp3 or other format file in knackĀ get it url. Using jQuery you can run sound file when Submit button is pressed or any event when you want.Ā
Ā
Regards,
Sunny Singla
+919855089359
Sunny, is it possible for you to tell me how to upload a url into Knack?
I would like to do something similar in the following, but canāt figure out how you did it:
https://roberts.knack.com/farmers#test-sound/
Any additional help is appreciatedā¦ JON
$(document).on(āknack-form-submit.view_82ā, function (event, view, data) { // Login Page to Redirect
var audio = new Audio(āhttps://cdn.pixabay.com/download/audio/2022/03/16/audio_492840191c.mp3ā);
audio.play();
});
Thank you Sunny as always.
I have created an object with two fields (name, file) where I can import a sound file that I have or downloaded. My question is, how to I found out the URL of this file after I import and save it into my Knack database so that I can place it in the link of the code you provided?
Here is an example of a audio file that I would like to played when user presses āsubmitā
When I replace the above link into the code you provided, nothing happens. I even downloaded the file and imported it into my Knack program hoping that I could get the URL where Knack stored it.
Hello Jon,
You need to see that values in a network folder. Also, you can add that object in view and user Knack.view.data to see itās url.
Thanks,
Sunny Singla
I appreciate the help Sunny, but for some reason I canāt get the below file or any file to work other than the one in your example.
Thanks againā¦ JON
thatās strange.
can you share your file i try to upload and share itās url
I just sent you an email with example app.