cortexrd / Knack-Toolkit-Library

Knack Toolkit Library
MIT License
26 stars 6 forks source link

_req Issues #296

Closed kukuk52 closed 5 months ago

kukuk52 commented 5 months ago

This may just be a KTL-beta issue that will be resolved once the next version is released, but I'm having issues getting the _req keyword to function consistently. Fields that should be highlighted and required are not showing up as such most of the time. Then, strangely, sometimes they will show up as required.

cortexrd commented 5 months ago

Hi Dan,

I've released a new Beta this morning with fixes that are related to your observation. Can you do a Ctrl+F5 to see if what you see still happens, please?

Norm

kukuk52 commented 5 months ago

Hey Norm, This is still happening on my end. For example, on this page: https://aftmi.knack.com/aftmi#union-membership-forms/view-local-details/64e39331b13aab17242306be/ Home Address, Cell Phone, and Employee ID should be required

CSWinnall commented 5 months ago

@kukuk52

Just a check if you have the formPreValidation set to true in your KTL config area.

Craig

cortexrd commented 5 months ago

@CSWinnall

It is enabled.

I am stepping through now.

BTW, @kukuk52, your first parameter is funky:

field_1281\nreq=field_1272

But this doesn't explain your issue.

Still investigating...

Norm

cortexrd commented 5 months ago

@kukuk52,

I found the bug - and it was a good one! Thanks for reporting this.

Try the Beta again please with Ctrl+F5.

BTW, the fields are not fully supported yet, but I'll work on this soon. Ex: Signatures and some address fields are not colorized pink. Paragraph Text, etc.

kukuk52 commented 5 months ago

Thanks, Norm! That seems to have done the trick. However, I'm still having some issues on a different page: https://aftmi.knack.com/aftmi#local-setup/digital-membership-card/

I've tried requiring several fields and formatting things a few different ways, but it doesn't seem to be working. This page requires a login but you should have that.

On Wed, May 22, 2024 at 5:09 PM Cortex R&D Inc. @.***> wrote:

@kukuk52 https://github.com/kukuk52,

I found the bug - and it was a good one! Thanks for reporting this.

Try the Beta again please with Ctrl+F5.

BTW, the fields are not fully supported yet, but I'll work on this soon. Ex: Signatures and some address fields are not colorized pink. Paragraph Text, etc.

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2125749962, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGOSISBHEJJQT53OUG3ZDUCPZAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVG42DSOJWGI . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

Ok, will try it later.

BTW, new Beta now supports Addresses (without enforcing address2) and Signatures properly!

Give it a try...

kukuk52 commented 5 months ago

Fantastic! Works great.

On Wed, May 22, 2024 at 6:49 PM Cortex R&D Inc. @.***> wrote:

Ok, will try it later.

BTW, new Beta now supports Addresses (without enforcing address2) and Signatures properly!

Give it a try...

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2125906734, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGP5WLUHOCB5B2MF6GTZDUOF5AVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRVHEYDMNZTGQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

Good!

Keep testing as much as possible, and I should be good for a release tomorrow around noon if nothing pops up.

Norm

kukuk52 commented 5 months ago

I've still got the issue with the other page. Nothing seems to be working to get those _req fields to work as they should.

On Wed, May 22, 2024 at 9:52 PM Cortex R&D Inc. @.***> wrote:

Good!

Keep testing as much as possible, and I should be good for a release tomorrow around noon if nothing pops up.

Norm

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2126048021, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGINIW5A7CCFKCTDSO3ZDVDWBAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWGA2DQMBSGE . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

Try new Beta from a second ago. I fixed that bug.

cortexrd commented 5 months ago

Oops, hold on... I've cut some code by accident and forgot to paste!!!

cortexrd commented 5 months ago

Ok, should be good now. Ctrl+F5 !!!

kukuk52 commented 5 months ago

Now it seems like neither one of the pages is working . . .

On Wed, May 22, 2024 at 10:20 PM Cortex R&D Inc. @.***> wrote:

Ok, should be good now. Ctrl+F5 !!!

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2126070286, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGJJFXO7DOI2XMRULSDZDVG6XAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWGA3TAMRYGY . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

Here, both are ok in Beta mode.

Weird...

Do you see any console logs?

kukuk52 commented 5 months ago

I'm not exactly sure what I'm looking for but nothing seems off in the logs. I can see both of us have the 24.14 running.

On Wed, May 22, 2024 at 10:27 PM Cortex R&D Inc. @.***> wrote:

Here, both are ok in Beta mode.

Weird...

Do you see any console logs?

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2126074960, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGOX4UH6KR335MHALPDZDVHYBAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWGA3TIOJWGA . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

The 24.14 doesn't mean anything. It's just the number in the KTL.js file that is also the Beta code presently. Are you sure you're in Beta?

Here's what I have. As you can see all is working as expected.

image

You don't see that?

kukuk52 commented 5 months ago

I do not see that. Mine is not highlighted.

KTL Screenshot

On Wed, May 22, 2024 at 10:42 PM Cortex R&D Inc. @.***> wrote:

The 24.14 doesn't mean anything. It's just the number in the KTL.js file that is also the Beta code presently. Are you sure you're in Beta?

Here's what I have. As you can see all is working as expected.

image.png (view on web) https://github.com/cortexrd/Knack-Toolkit-Library/assets/42851359/dc4b8104-4618-4649-b507-602f84ef67ec

You don't see that?

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2126085662, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGIM57ZS4LAOYFEUWDTZDVJRJAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRWGA4DKNRWGI . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

And you did Ctrl+F5 - right? If so, are you available for a meeting so I can debug this live? Team or Zoom, and when? Now would be best for me so I could do a release after.

cortexrd commented 5 months ago

Oh... I did a full refresh and I see the bug here now. Will investigate.

cortexrd commented 5 months ago

Try new Beta please. That was another nasty race condition bug - thanks 👍

kukuk52 commented 5 months ago

Both pages are working as expected now. Thank you!

On Thu, May 23, 2024 at 9:38 AM Cortex R&D Inc. @.***> wrote:

Try new Beta please. That was another nasty race condition bug - thanks 👍

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2127132476, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGMVL4NJ7DJCPBULZVTZDXWMTAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGEZTENBXGY . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

Perfect - thanks a lot for your patience ! Will release soon, stay tuned...

Norm

kukuk52 commented 5 months ago

Just a quick follow-up.

If I use "_req=field_1, field_2, etc" I'm not getting the expected required fields.

However, everything seems to work fine if I use _req=field_1 _req=field_2

Not a big issue on my end but the documentation indicates that you can use commas to separate the fields.

On Thu, May 23, 2024 at 10:21 AM Cortex R&D Inc. @.***> wrote:

Perfect - thanks a lot for your patience ! Will release soon, stay tuned...

Norm

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2127250983, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGL574TYIIT7ISKLA33ZDX3OJAVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGI2TAOJYGM . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

kukuk52 commented 5 months ago

I just ran another test and everything is working fine using the commas. Please disregard the previous comment.

kukuk52 commented 5 months ago

I'm sorry to bring this back up again, but something has changed and my req fields are no longer displaying as such. I'm in beta and have Ctrl+F5 multiple times. I have one page working but another is not. https://aftmi.knack.com/aftmi#local-setup/digital-membership-card/

cortexrd commented 5 months ago

Yes, I noticed some more issues. Geez... this feature is never ending! There's a big synchronization conflict between _req and the form persistence, and it's super hard to debug.

cortexrd commented 5 months ago

Dan,

Try Beta please. That was a quick fix.

cortexrd commented 5 months ago

Another Beta update: middle name never required and other bug fixes.

kukuk52 commented 5 months ago

Everything looks good right now. I'll keep playing with it and let you know if anything comes up.

On Fri, May 24, 2024 at 8:35 AM Cortex R&D Inc. @.***> wrote:

Another Beta update: middle name never required and other bug fixes.

— Reply to this email directly, view it on GitHub https://github.com/cortexrd/Knack-Toolkit-Library/issues/296#issuecomment-2129428630, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQJOGOXIYRDLGRGPQML7ZLZD4XY3AVCNFSM6AAAAABIEAFLQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRZGQZDQNRTGA . You are receiving this because you were mentioned.Message ID: @.***>

-- Daniel J. Kukuk Data & Communications: AFT Michigan, AFL-CIO @.*** (248) 894-9899

cortexrd commented 5 months ago

Will close this now. Feel free to re-open if you see anything else. Cheers, Norm

kukuk52 commented 5 months ago

Thanks for all the work you've put into this, Norm. Overall, it's working great. I did notice a minor bug: It seems like using _req keyword is causing Knack's display rules to malfunction. When using _req the hide display rule I was using on a form is no longer working.

kukuk52 commented 5 months ago

Disregard that previous message. I was setting it up incorrectly. It works great!

kukuk52 commented 5 months ago

I'm running into issues with this again. The submit button is not accepting submissions even when the necessary fields are filled out. Now occurring on this page: https://aftmi.knack.com/aftmi#union-membership-forms/view-local-details/64e3938ab13aab1724231a1c/

I've only tested it a few times, but it seems like those issues go away when I'm in beta.

cortexrd commented 5 months ago

Dan,

I've just fixed that bug and another one with the Address fields would leave the Submit button disabled when auto-completed.

Get the latest Prod release v0.25.2.

Cheers, Norm