Blog Sections Open

Resetting AjaxForm Correctly Inside Bootstrap Modals

How to reset an AjaxForm-powered form cleanly when it lives inside a Bootstrap modal.

Forms inside modals are convenient until the second open. Then stale validation messages, old success text, or half-reset fields start leaking into the next interaction. That is exactly where Bootstrap modal events become useful.

The core idea is simple: when the modal closes, explicitly reset or rebuild the AjaxForm state so the next open behaves like a fresh form, not like a resumed previous request.

Bootstrap’s modal lifecycle events give you the right hook for that reset. The important part is to treat the form state and the modal state as two separate layers. Closing the modal does not automatically clean the AjaxForm internals for you.

This is a small but highly reusable UI pattern for Evolution projects that depend on modal callbacks, quote forms, or quick-contact flows.

Newer post

Customizing Breadcrumbs for Unpublished or Hidden Resources in Evolution CMS

How to adapt the Breadcrumbs component when unpublished or hidden resources should still affect navigation output.

Older post

Adding Better Captcha Protection to eForm in Evolution CMS

How to replace or extend the default eForm captcha flow with stronger image generation or third-party captcha checks.