Page 1 of 1

Password field doesn't show text if show icon is clicked on

Posted: 08 Apr 2024, 19:06
by sulpher
Hi,
Dmitrijs found an issue: in payment method we added a field with type "password".
There is an eye icon, but if we click on it, no text appears. Password is still hidden.

Image

Looks like a Phoca Cart issue.


Phoca Cart 4.0.10
Joomla 4.4.3

Re: Password field doesn't show text if show icon is clicked on

Posted: 08 Apr 2024, 19:46
by sulpher
Also showon doesn't working too.

Re: Password field doesn't show text if show icon is clicked on

Posted: 09 Apr 2024, 14:06
by Jan
Hi, thank your for the info, maybe this can be related to some functions which needed to be written when Joomla core removed tooltips. Where exactly does not work the showon? In tab for payment plugin parameter, this can be maybe caused by dynamically loaded form, not sure if the Joomla core feature for showon can work with dinamically form items. If not, maybe it will be not possible to somehow correct this core function and the showon parameter in plugin parameters will have to be omitted :idea:

Jan

Re: Password field doesn't show text if show icon is clicked on

Posted: 09 Apr 2024, 14:18
by Jan
Confirmed, both showon and display/hide password Javascripts (e.g. media/system/js/fields/passwordview.js) are not able to work with dynamically loaded forms :idea:

In the AJAX which loads the parameters, there is new calling of showon script, maybe it changed in newest Joomla again (as it worked previously for showon)

Re: Password field doesn't show text if show icon is clicked on

Posted: 09 Apr 2024, 15:01
by Jan
BTW, testing now, the showon works OK there. :idea:

The problem with password is, the core password function in Joomla is wrongly written as it does not count with dynamically added form fields. This is different to showon which has initialize function and can be reinitialized after loading new dynamic items (which is even not right as it does not count with dynamically items from start but as developer you can somehow correct it).

And it even seems that this does not work in subforms so we need to write some bug report for Joomla core.

Re: Password field doesn't show text if show icon is clicked on

Posted: 09 Apr 2024, 16:08
by Jan

Re: Password field doesn't show text if show icon is clicked on

Posted: 09 Apr 2024, 16:19
by sulpher
Ok, it is nice you've reproduced the issue and already reported the bug to Joomla's Github project.
I hope this task will be resolved later.