I'm building a tool that contains a few clickable regions. Each region has a link with class="use-ajax" data-dialog-type="modal"
pointing at a custom form route.
Everything is working great and I'm able to get the data from the form and store it. I, however, need the user's selection in this modal form to be reflected in the region they initially clicked.
I'm at a loss aside from storing their selections in localStorage or something and populating that region when they close each modal. That seems a little hacky though. Is there a cleaner way of accomplishing this that I'm missing?
<div class="region">
<a class="use-ajax" data-dialog-options="{"width":550, "dialogClass": "my-region-class" }" data-dialog-type="modal" href="/route/to/custom/form">
<div class="content">
Click to select
</div>
</a>
</div>
/my-route/{region}