Is there a list of object methods available when using JS? For example: .replace() or .toUpperCase().
Question
Question
List of Object Methods available in JS
Answer
It is also worth mentioning that the example methods you provided of .replace() and .toUpperCase() are part of the JavaScript language (i.e., not specific to Forms) so they won't be listed in detail in Forms documentation.
For that, you should look at JavaScript documentation in other places like the MDN Web Docs or W3Schools.
String.prototype.toUpperCase() - JavaScript | MDN (mozilla.org)
JavaScript String toUpperCase() Method (w3schools.com)
The notable difference between the classic designer and the modern designer is that the classic designer also imported jQuery, so a lot of examples you'll find for classic form customization rely heavily on jQuery.
You can use all the "vanilla" javascript methods in the modern designer, but any jQuery code would need to be converted unless you decide to import the jQuery library yourself on the relevant forms.
Replies
See if this page gets you what you're looking for:
Edit: this looks like it's for the Classic Designer and probably isn't what you need. Sorry!
Thank you. Yes. That type of information but for the new forms designer.
It is also worth mentioning that the example methods you provided of .replace() and .toUpperCase() are part of the JavaScript language (i.e., not specific to Forms) so they won't be listed in detail in Forms documentation.
For that, you should look at JavaScript documentation in other places like the MDN Web Docs or W3Schools.
String.prototype.toUpperCase() - JavaScript | MDN (mozilla.org)
JavaScript String toUpperCase() Method (w3schools.com)
The notable difference between the classic designer and the modern designer is that the classic designer also imported jQuery, so a lot of examples you'll find for classic form customization rely heavily on jQuery.
You can use all the "vanilla" javascript methods in the modern designer, but any jQuery code would need to be converted unless you decide to import the jQuery library yourself on the relevant forms.
Fantastic. So all of the vanilla methods are available in the new forms.
One question. You stated that the JQuery library could be imported into the specific form. How would that be done?
Thank You
I'm not 100% sure since I haven't really done anything in the modern designer, but I believe they have a tab named External where you can reference other script sources either from a cdn or a locally hosted source.
However, my recommendation would be to only go that route if absolutely necessary since bringing in the jQuery library adds a lot of overhead.
Thank You. Might be worth looking into.
Although you could import jquery you will not be able to use it to interact with the form like you do in the classic designer. Like other commenters mentioned all other (non html related) JavaScript will work just fine. If there is a specific issue you are facing feel free to create a post and I’m sure you’ll get an answer. We are always looking for other use cases if something doesn’t work for you.