Is it possible to add sound beep to error

  • AgilityAssoc.Canada
    Asked on April 16, 2018 at 11:39 AM

    Hi,

    I was curious if it is possible to add a sound beep when an error message appears or field must be field etc. ?

    best, Robert

  • David JotForm Support
    Replied on April 16, 2018 at 1:02 PM

    In theory it is possible with something like what is described in the following guide:

    https://css-tricks.com/form-validation-web-audio/

    Though it would not be possible without using the form source code embedded to a web page since javascript cannot be added directly to forms.

  • AgilityAssoc.Canada
    Replied on April 16, 2018 at 1:43 PM

    Hi,

    So after a quick at this page javascript is required. I found this script, might it work?

    <audio controls>
      <source src="horse.ogg" type="audio/ogg">
      <source src="horse.mp3" type="audio/mpeg">
    Your browser does not support the audio element.
    </audio>

     I would use my own sound.mp3 file.

    Best, Robert

  • David JotForm Support
    Replied on April 16, 2018 at 2:54 PM

    The files could be referenced but there would be no way to tell the form to play the sound when an error is triggered.  That would require the rest of the scripts in that guide, which could not be added directly to the form.

  • AgilityAssoc.Canada
    Replied on April 16, 2018 at 3:59 PM

    OK... Well I think that would be a great addon or feature request along with button clicks.

    I may try and do this on one of our servers.

    many thanks for the feed back.

    Best Robert