Skip to main content
All CollectionsBuild & customizeCreate formsFAQs
How can I make the collapsible content box closed by default?
How can I make the collapsible content box closed by default?

The toggle boxes contain extra information that users can click to show if they want to.

Updated over 6 months ago

To make the toggle box "Collapsible" closed by default:

  1. Open your formaloo and click on "Edit base"

  2. From the settings, scroll down to see the "Custom JS" box.

  3. Copy the following code and paste it in the custom JS box.

<script defer> window.addEventListener('load', function() { var detailsElements = document.querySelectorAll('details'); detailsElements.forEach(function(d) { d.removeAttribute('open') }); }); </script>

Did this answer your question?