finnito - 2 months ago

Hey all,

I'm using the Forms Module to display a basic contact form:

  • Name (text field)
  • Email (text field)
  • Message (textarea field)

And I am using the following code to embed it in the page:

{{ form('forms::contact').setOption('prefix', 'contact_').get()|raw }}

When the page loads it seems that the field types have inserted a bunch of JS resources via the scripts.js asset collection, however, I don't think that they actually do anything useful in the case of my form. How can I remove these assets from the collection so that I do not bloat my page with JS that is not doing anything?

NB: The scripts are: translations.js, inputmask.js, binding.js, masking extensions, and a heap of others.