Page 1 of 1

Button back to parent

Posted: 2014-04-10 17:20
by bhayes
My first 'has anyone done this already' post.

My application has a main table, sub tables, and sub-sub tables. Visually, it looks like:

Code: Select all

MAIN.id  ----------> SUB.id
MAIN.name            SUB.order_id ---------------> SUBSUB.order_id
MAIN.address         SUB.order_description         SUBSUB.line_number
                                                   SUBSUB.item_number
I have each table on it's own page, and Appgini generates the button access the filtered button for the subpage - which works great.

But when the user is down in SUBSUB and wants to go back to the SUB page, the only option seems to be hitting the browser back button a bunch of times to go past what they've done until they're back on the page they want. I've looked at the parent/child relationship settings in Appgini, and I'm not seeing an option to add it.

So what I'm looking for is a button that takes the user back to the display of the page it was called from.

I feel the solution is probably in the detail view hooks for the sub tables /hooks/<table>.php in the _dv function.

I've seen the post which does a semi-complicated html-pattern-find-replace that changes the page code to make buttons disappear, but I want to be sure that I'm not missing something that is easier.

Thanks in advance!

Re: Button back to parent

Posted: 2014-04-16 11:16
by a.gneady
In the detail view of the child table, you can find a button to the right of each lookup field that links to the corresponding parent record. See this example from the online demo: http://bigprof.com/demo/orders_view.php ... edID=11075

The above link shows the detail view of an order. The order has a customer, an employee and a shipper ... each of these is a lookup field, and has a link to the parent record.