You are viewing limited content. For full access, please sign in.

Question

Question

List of Object Methods available in JS

asked on October 27, 2023

Is there a list of object methods available when using JS? For example: .replace() or .toUpperCase().

0 0

Answer

SELECTED ANSWER
replied on October 30, 2023

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.

1 0

Replies

replied on October 30, 2023 Show version history
0 0
replied on October 30, 2023

Thank you. Yes. That type of information but for the new forms designer.

0 0
SELECTED ANSWER
replied on October 30, 2023

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.

1 0
replied on October 31, 2023

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

0 0
replied on October 31, 2023

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.

0 0
replied on October 31, 2023

Thank You. Might be worth looking into.

0 0
replied on November 14, 2023

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. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.