Using custom JS file via Themes and changing validation to onblur
This is more just an observation/comment than a question, so hopefully it might help someone in future. Apologies if it's covered elsewhere and I didn't find it.
I had a need to change validation so that email addresses don't show as incorrect the minute you start typing, so I looked into it and found all I need to do was disable onkeyup, something like this:
I copied the umbracoforms.js into my theme folder (making a new folder in App_Plugins/UmbracoForms/Assets/Themes so I didn't modify the default js file. (I love the new Theme mechanism).
However, my js wasn't output, even though I changed the forms rendering script as instructed so it read:
It turn out that you also need to copy the Script.cstml in your Views Themes folder and change the path to the js because it's hard coded to look for the default theme js and not directly by specifying a theme parameter.
Maybe I just wasn't reading the docs properly, or maybe it needs clarification.
Using custom JS file via Themes and changing validation to onblur
This is more just an observation/comment than a question, so hopefully it might help someone in future. Apologies if it's covered elsewhere and I didn't find it.
I had a need to change validation so that email addresses don't show as incorrect the minute you start typing, so I looked into it and found all I need to do was disable onkeyup, something like this:
So following the instructions on this page https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Themes/
I copied the umbracoforms.js into my theme folder (making a new folder in App_Plugins/UmbracoForms/Assets/Themes so I didn't modify the default js file. (I love the new Theme mechanism).
However, my js wasn't output, even though I changed the forms rendering script as instructed so it read:
It turn out that you also need to copy the Script.cstml in your Views Themes folder and change the path to the js because it's hard coded to look for the default theme js and not directly by specifying a theme parameter.
Maybe I just wasn't reading the docs properly, or maybe it needs clarification.
HTHS (hope this helps somebody)
/t
P.S. pull request now submitted for the documentation page.
is working on a reply...