custom error messages

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
User avatar
wsiconcrete
Posts: 9
Joined: 2015-04-27 16:39
Location: SC, USA

custom error messages

Post by wsiconcrete » 2020-03-26 05:52

AppGini 5.82 with JavaScript Helper and no plugins installed. It is an older app (originally generated in 2015) but have overwritten all files when generating from AppGini.

Was able to get the solution here (viewtopic.php?f=7&t=1740&p=10871&hilit= ... age#p10871 to work, but...

Wouldn't it be nice if the built-in functions for errors/dialogs could be accessed in some way through /hooks? By "built-in" I mean the functions in TABLE_dml.php that produce dialogs like this and highlight the offending field instead of going back to the table view with an error at the top of that page:

Annotation 2020-03-26 010517.png
Awesome!! Clicking "OK" returns to form with offending field highlighted.
Annotation 2020-03-26 010517.png (14.61 KiB) Viewed 456 times

I tried adding my own validation to one of the if{} statements in TABLENAME_dml.php and it did work (stopped the insert) but the dialog came out like this and the field was not highlighted after clicking "Back":
Annotation 2020-03-26 011327.png
Annotation 2020-03-26 011327.png (10.65 KiB) Viewed 456 times

Hope I haven't missed this somewhere when I searched forum and google or made some stupid error in my code, just thought I would throw it out there FWIW. Imagine it can be done through the _dml file but so far I have been able to avoid editing system files and would prefer not to have to do it that way.

Thanks,
Brandon

Post Reply