Custom Read/Edit forms

Hey Johnny,
Sorry – have another one for you.

In CI3 and GC1, I was able to hijack the route definitions for grocery crud’s “read” and “edit” functions and redirect them to a different display routine. Then, when I submitted the edit updates, I’d pass that back to the grocery crud for processing.

In CI4 and GC3, it doesn’t seem to work the same way.
I can take control of the routes in CI4, but it appears that GC3 isn’t redirecting to the new page, but instead is just updating the page render without issuing a refresh/redirect…which keeps me from leveraging the custom routes I had defined in CI4.

I tried seeing if setting ‘open_in_modal’ = false would case it to go back to doing page redirects, but it doesn’t.

Is there any way that I can do this with GC3?
I realize that I’m doing all the heavy lifting of the page drawing/formatting, but it’s been exceptionally useful in the past.

To help explain, consider the following example:
UpdateApplications/do_edit() is the root of the grocery crud for this instance.

By default, if you click the edit button in the datagrid, you display UpdateApplications/do_edit/edit/# in the modal, and allow someone to edit and then click save or abandon those changes.

I’m trying to redirect UpdateApplications/do_edit/edit() to a new routine outside of your GC3 renderer.

The routes are correct, as if I go to that on the browser URL directly, it shows me what I expect to see; however, clicking the “edit” button within the datagrid shows me the GC3 rendered version, so it appears that GC3 is being smart and optimizing the queries back to the website and not doing a full page redirect.

So … any option to tell GC3 to use a different function for displaying info, or to tell GC3 to do full page refreshes (which is what GC1 was doing).

Would appreciate your thoughts on this one.

Thanks!

Erick

Hey Johnny,
So, one way I found to do this is by using custom Action buttons…

which is definitely ok…and kind of makes sense in a way…still working thru the viability of it.

[UPDATE] This seems to work as I need, and I’m fine with using the setActionButtons (it actually makes sense to do so), so consider this a non-issue at this point.

Thanks
Erick

1 Like