before_insert FALSE redirect to Table View

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
User avatar
zibrahim
Veteran Member
Posts: 160
Joined: 2020-01-28 18:30
Location: Malaysia

before_insert FALSE redirect to Table View

Post by zibrahim » 2024-11-25 10:20

Hi there,
Is it normal if you return FALSE in before_insert function, the error message will briefly appear (less than 1 second) and the page will be redirected to the table view?
If it is true, than is there anyway than we can make it remain on the same detail view with the error message appear on the top?

Thanks.
Zala.
Appgini 24.17, MacOS 14.6 Windows 11 on Parallels.

User avatar
a.gneady
Site Admin
Posts: 1320
Joined: 2012-09-27 14:46
Contact:

Re: before_insert FALSE redirect to Table View

Post by a.gneady » 2024-11-26 19:15

You can display the error message in the redirected page by following the instructions at https://bigprof.com/appgini/help/advanc ... ges-class/
:idea: AppGini plugins to add more power to your apps:

User avatar
zibrahim
Veteran Member
Posts: 160
Joined: 2020-01-28 18:30
Location: Malaysia

Re: before_insert FALSE redirect to Table View

Post by zibrahim » 2024-11-27 00:43

Thanks Ahmed for the reply.
I tried it and it works, BUT the issue is, the message appeared briefly (less than 1 sec) and then disappeared. As if the page (table view) has just been reloaded.
Any reason for that? Thanks.
Zala.
Appgini 24.17, MacOS 14.6 Windows 11 on Parallels.

User avatar
a.gneady
Site Admin
Posts: 1320
Joined: 2012-09-27 14:46
Contact:

Re: before_insert FALSE redirect to Table View

Post by a.gneady » 2024-12-05 10:45

I was able to reproduce this issue ... it's happening when a user has changed the default records per page to a different value, which causes a page redirection to apply the customized records per page, clearing away the error message. I'll make a fix for this issue in the next release, God willing.
:idea: AppGini plugins to add more power to your apps:

Post Reply