Trongate MX
Documentation

Help Improve Our Docs

If you’ve found an error, spotted something missing, or feel a section could be clearer or better explained, we’d love to hear from you. Your feedback helps keep the documentation accurate and useful for everyone.

Please report issues or suggest improvements on GitHub. Community input is invaluable in making the docs stronger.

Not comfortable with GitHub? No problem — you can also get in touch with us directly via our contact form. We welcome all feedback.

Form Display Methods

When integrating forms into your web application, Trongate MX offers three powerful approaches to form presentation: default display, modal windows, and hidden forms with triggers. Each method serves different user experience needs while maintaining the dynamic capabilities of Trongate MX.

Default Display Method

The simplest approach is to display forms directly on the page load. This method works well for primary actions where form completion is the main goal.

Here's how to create a basic form using Trongate's helper functions:

For those who prefer working with pure HTML, here's how to achieve the same result:

Modal Window Forms

Modal windows create focused interactions by displaying forms in overlay dialogs. This approach is perfect for secondary actions that shouldn't disrupt the main content flow.

First, let's create a button to trigger the modal using Trongate's helper functions:

Here's how you can accomplish the same using standard HTML:

Full documentation on how to build dynamic modals, with Trongate MX, is available here.

The corresponding view file for the modal content would look like this using helper functions:

To implement this using only HTML, see the example below:

And the controller method to serve the form:

Hidden Forms with Triggers

For a cleaner interface, forms can remain hidden until needed. This approach uses triggers to reveal forms dynamically.

Here's how to implement this using Trongate's helper functions:

For a pure HTML approach, here's the corresponding code:

Best Practices for Form Display

  • Use default display for primary page actions where form completion is the main goal.
  • Choose modals for secondary actions that require focused attention.
  • Implement hidden forms when you want to preserve space and provide progressive disclosure.
  • Always ensure clear visual feedback when forms are shown or hidden.

Summary

Trongate MX provides flexible options for displaying forms, each suited to different scenarios. The default display method works well for primary forms, while modal windows create focused interactions for secondary tasks. Hidden forms with triggers help maintain a clean interface while providing progressive disclosure. By choosing the right display method and implementing it with Trongate MX's intuitive attributes, you can create engaging and user-friendly form experiences.

×