Forums

I do not know how to write the input mask

misop 30 Nov, 2024

Hello.

I am trying to define "Input Mask" in several forms, but it is not working as intended and I am having trouble.

case 1: I want to limit the number of digits to 5 digits only. However, it is not working well.

mask=00000

case 2: I want to limit it to alphanumeric characters and underscores. But it is not working well.

mask=/^[a-zA-Z0-9_]*$/

*I tried writing "/^d+$/" referring to the imask.js.org site, but it didn't work.

Could you please give me some advice?

Max_admin 30 Nov, 2024
Answer

Thanks for posting about this, the 00000 required a code fix, and the regex does not work too and required some changes, you need to do the following:

drag a JS view to your page, and add this code:

masksetting = {mask: /^[a-zA-Z0-9_]*$/}

Then in your Mask settings you will need to add the mask variable name:

that should make it work, and you will be able to use all the mask options on the help page, for this to work you need v8.0.29

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
misop 30 Nov, 2024

Thank you for responding promptly.

I have two questions about that answer.

1.Is "JS view" referring to "JavaScript" in "Views"?

2.Sould I wait for the release of v8.0.29, or is it available now on GitHub or elsewhere?

Max_admin 30 Nov, 2024

1- yes

2- Unfortunately it's not available or Github, please give me few hours to prepare the installer, I will post here when it's ready

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 30 Nov, 2024

the new update is ready

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
misop 01 Dec, 2024

Thank you very much.

I tested it. The result is that the simple form works fine.

case 1 and case 2 both worked!

*This test form is “test-form1” which I will explain later.

However, if there is a “Checkboxes Group” in the same form and its “Behaviors” is set to “Required”, the “Input Mask” in the same form does not seem to work.

*This test form is “test-form2” and “test-form3”, which will be explained later.

This behavior was tested on my experimental site.I was able to log in temporarily. Please try it.

*ChronoForms is not working on the front end of this test site. Please test it on the backend component

Max_admin 01 Dec, 2024

Please download the new v8.0.30 (download again now as I have applied a patch for this), and test this issue, I think it should be fixed

And do not put any login details here, this is a public forum and hackers can use the details to break your website, I did not login!

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
misop 01 Dec, 2024
1 Likes

Thank you for your quick response.

The issue was resolved in v8.0.30.

Thanks for the heads up on the “login details”. I understand the risks. The sites listed, including the URL, were for testing only.

You need to login to be able to post a reply.