Problem with "Required" behavior

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
nycwebmaster
Veteran Member
Posts: 90
Joined: 2015-11-23 01:02

Problem with "Required" behavior

Post by nycwebmaster » 2022-02-02 00:22

Hi,

I have the latest Bizzworxx Java script library. I am using one of the modifications for detail view for collapsible panels

https://appgini.bizzworxx.de/products/j ... le-panels/

Since I applied the modification on that table when a field is required I still get the alert of the required field but it does not take me automatically there, in simple words does not auto focus on the required field like before.


How can I fix that it does work like before?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Problem with "Required" behavior

Post by jsetzer » 2022-02-02 05:10

Good morning,

when required fields have been placed in collapsible panels which are closed (collapsed) and then validation fails, the fields get marked but the parent collapsed panel does not open automatially.

We need to automatically open collapsed panels containing .has-error elements after validation, if validation has failed. And best would be if the element could be scrolled into view and also focused.

I have tried several overridings of AppGini standard code. I'm close to the solution. Stay tuned.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Problem with "Required" behavior

Post by jsetzer » 2022-02-02 08:20

OK, I think I have got a working solution. I did not only optimize for required empty fields in collapsed panels but also for required empty fields in different tabs.

Check out this example

There are three required fields inside a collapsible panel in a custom tab:

chrome_OHR2yuLn4L.png
chrome_OHR2yuLn4L.png (20.69 KiB) Viewed 1254 times

Note that Ordernumber is required but empty.


Now I'm going to collapse the panel...

BB5FryrpTX.png
BB5FryrpTX.png (14.52 KiB) Viewed 1254 times

...and select a different tab, then try to save the record.

chrome_NMsXFZe1kf.png
chrome_NMsXFZe1kf.png (5.51 KiB) Viewed 1254 times

As expected, AppGini validation pops up the well known modal dialog...

chrome_TknEzICDKB.png
chrome_TknEzICDKB.png (13.84 KiB) Viewed 1254 times

...and after clicking [OK] button, my workaround code activates the correct tab, then expands the collapsed panel and focuses on the required but empty field:

chrome_BbehdtcWvC.png
chrome_BbehdtcWvC.png (23.31 KiB) Viewed 1254 times
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Problem with "Required" behavior

Post by jsetzer » 2022-02-02 08:22

I am planning to add this optimization to next version of AppGini Helper Javascript Library.

If you need that optimization earlier, please send your order number to [email protected].
Within your 1-year-free-updates period I can send the required code to you.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

nycwebmaster
Veteran Member
Posts: 90
Joined: 2015-11-23 01:02

Re: Problem with "Required" behavior

Post by nycwebmaster » 2022-02-02 20:50

Thank you so much! I sent you the latest order via email. Also purchased the additional plugin that you have. Thanks.

Post Reply