Modal form bugs

I have recently discovered what appear to be two bugs in modal forms. I made a post about the first, List navigation problem when posting modal form, last month and one about the second, Modal form display problem, last week, but there has been no response to either. Presumably there must be someone using modal forms, so has anyone else seen these problems or have a got a setting wrong somewhere? A search of the forums has revealed nothing relevant, although there may be something hiding somewhere. I could have a look into the code to try and find out what is happening, but would appreciate some guidance on where to start!
 
I think this is an old issue (already in F3), it seems to be some caching.

I have seen this, too. The only way I found to display the correct data was to display an other menu item and then the list again.
 
Thanks – I feared it was something old and well buried!

I have found that refreshing the list after the form closes clears both problems (without showing any change in the URL). I do not suppose you know of a way to trigger a refresh automatically? It seems that redirect occurs too soon.
 
I got no further with it, but looked instead for an alternative. What I really wanted was a popup that would edit a few fields from a simple table and then close rapidly without reloading the list. I had a vague recollection of an inline edit plugin, but found that had not made it into F4, having problems already in F3. With a few changes, I got it working after a fashion in F4. It actually edits a field by putting up a popup and has a facility to edit a number of fields in a single popup. For the purposes for which I wanted the modal form, it would be better than a modal form as it is a true popup, which does not refresh the list on closing like a modal form. It thus works much faster on both opening and closing, which is beneficial for a simple list.

What I have been doing (when I can find the time) is creating a new “listedit” plugin based on the inlineedit plugin. I posted a reply about this when someone posted about the missing F4 inlineedit plugin (Any chance of updating the Inline Edit plugin for J4?).

I am now a fair way through creating the new plugin. It will have two modes of operation, either the inline edit mode to edit one or more fields by clicking an editable field or a new popup edit mode, triggered by the row edit button that normally opens the related form (modal or not). The plugin will be only for simple lists as the problems with complex usage, as described in the wiki, will remain.

Any comments or suggestions?
 
I had used the inline edit plugin with F3 and Joomla 3 for quick/simple edits as well (and it worked great updating something like a phone number or address). I'm pretty sure it came with a big warning about using it with joined tables (where a list had 1 or more joined tables). Just mentioning it as a heads up.

My scenario is a little different. In the past (Fabrik 3 & Joomla 3), I ran into issues with opening forms that had several joined lists, repeating groups and elements that were cascading dropdowns. Depending on the number of repeating rows, the queries would end up using too much memory and cause page timeouts.

This time around, I used SP Pagebuilder to create an "edit" page that opens the form for my main list as a Fabrik Module. The main list doesn't have any joins (the only joins within the query to open the form is from a couple dropdown select elements). I pass the rowid as a parameter in the URL by having a menu item that points to a copy of my main list - where it has a custom edit link pointing to my custom "edit" page. This way, the Fabrik form module knows which row to open.

On my "edit" page, in place of using Fabrik's bootstrap tabs layout and loading several related groups at once, I created separate lists for related content such as documents, contacts, fee schedule, notes etc... that act as groups (that would have been joined Fabrik lists) and each list has an element named "parent_id" that has the same purpose as what is done within Fabrik, but I use it a little differently.

Each of the associated lists have their own Fabrik list module created to load into my edit page when they are called via fetch request. Rather than how the bootstrap tabs layout would still pull everything at once, I mimic the functionality by having another section below the main form on my edit page that lists tabs (named accordingly to each associated list module). To get this to work, each tab has a class associated to it and an event listener (in js) waiting for an onclick action to trigger a fetch request. The request includes the rowid value (from the edit page's url) and the Fabrik list module pre-filter is set to only return records where the associated list's "parent_id" is equal to the main form's "id" (from the rowid parameter). The fetch response gets inserted into the div below the tab list that was just clicked. To do all this, I created a form_#.js file (where "#" is the id of my main list's form) and saved it in components/com_fabrik/js/. It gets loaded when my main form loads within my edit page. All works great except...

Within each associated list module's advanced settings, I set the "Ajaxify Links" option to "Yes" to have a modal open when I click either the Add or Edit buttons of the associated list that is open. The modal does open, but the ajax request fails. I used to work before I updated Fabrik from 4.0Zeta to 4.2 and Joomla from 4.2 to 4.4. I don't know what changed, but troester suggested that it might have been a template update (I'm using Helix Ultimate) or a SP Pagebuilder update (totally possible). So, I've reached out to JoomShaper to see if they might be able to help...

Currently, if I turn off "Ajaxify Links" in the modules, each list opens its form in the same window and when I click "Save", I'm directed back to my edit page (with all of the updated content saved). It is useable this way, but I preferred the modal as it didn't reload the edit page (similar to what you were hoping for).

Anywho, good luck with the plugin!
 
Back
Top