CodeIgniter Forums
Shield views with modals - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Shield views with modals (/showthread.php?tid=87005)



Shield views with modals - Codinglander - 03-04-2023

Hello Community.

I am using shield and I have a little problem. I use modals for registration, login and magic-login. If the credentials
are okay (all forms passes validation without errors), there are no problems.
But if wrong credentials or invalid data submitted shield redirect to the default views and show errors there.
My question: how to modify sourcecode that the errors are shown in my modals.

Best regards,

Kighlander...


RE: Shield views with modals - InsiteFX - 03-05-2023

Shield Customize - Customize Login Redirect


RE: Shield views with modals - Codinglander - 03-05-2023

(03-05-2023, 12:03 AM)InsiteFX Wrote: Shield Customize - Customize Login Redirect

Hi InsiteFX.

I think you did not understand my problem.
The login-, register- and magicLogin-Forms are well done with modals. And if in this Modals the correct informations are entered all works fine.

BUT

if  wrong data entered shield redirect to the regular login-page (register-page or magicLogin-page) instead of a regular redirect.

The link you posted here is where to redirect after a CORRECT login. This works also fine here...


RE: Shield views with modals - kenjis - 03-05-2023

See https://github.com/codeigniter4/shield/blob/6e14423203c9234b62f86617d18371568e859778/src/Controllers/LoginController.php#L63-L65


RE: Shield views with modals - Codinglander - 03-05-2023

(03-05-2023, 04:59 PM)kenjis Wrote: See https://github.com/codeigniter4/shield/blob/6e14423203c9234b62f86617d18371568e859778/src/Controllers/LoginController.php#L63-L65

Hello kenjis,

yes, THAT is what I am looking for.

Thanks !