Leave a message in this thread and the user's contacts will be shown to you
Please rate the following revision, each part separately
[file]21640[/file]
Part 1
[file]21640[/file]
It is necessary that for fields with types:
[file]21640[/file]
- Number,
[file]21640[/file]
- A floating point number,
[file]21640[/file]
when we fill in the data in it, a keyboard with the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 was displayed, when clicking on which such a number will be added to the field.
[file]21640[/file]
It will be possible to enter any number of consecutive numbers, including those separated by a comma or a period according to the condition of filling the field with type Floating point number
[file]21640[/file]
Part 2
[file]21640[/file]
It is necessary that for fields with the type:
[file]21640[/file]
- Phone,
[file]21640[/file]
- email,
[file]21640[/file]
- String, etc., it was possible to set an input mask.
[file]21640[/file]
For example, for a phone, the mask can be as follows:
[file]21640[/file]
+99(999)999-99-99,
[file]21640[/file]
where 9 is a replacement digit from those we enter.
[file]21640[/file]
That is, when we fill in such a field, we have a numeric keyboard and we can simply substitute numbers, commas (dots).
[file]21640[/file]
It would be great if you could choose a country from the available list for fields with the Phone type, as is already done on your site when a new box is registered, for example.
[file]21640[/file]
See screenshots.
[file]21640[/file]
For email, the mask can be as follows:
[file]21640[/file]
*@*.*
[file]21640[/file]
where * is any character that is acceptable for creating email addresses.
[file]21640[/file]
These functions need to work when the form is filled out:
[file]21640[/file]
- from a computer
[file]21640[/file]
- from a mobile device: smartphone, tablet, etc
[file]21640[/file]
[file]21640[/file]
Please rate the following revision, each part separately
Part 1
It is necessary that for fields with types:
- Number,
- A floating point number,
when we fill in the data in it, a keyboard with the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 was displayed, when clicking on which such a number will be added to the field.
It will be possible to enter any number of consecutive numbers, including those separated by a comma or a period according to the condition of filling the field with type Floating point number
Part 2
It is necessary that for fields with the type:
- Phone,
- email,
- String, etc., it was possible to set an input mask.
For example, for a phone, the mask can be as follows:
+99(999)999-99-99,
where 9 is a replacement digit from those we enter.
That is, when we fill in such a field, we have a numeric keyboard and we can simply substitute numbers, commas (dots).
It would be great if you could choose a country from the available list for fields with the Phone type, as is already done on your site when a new box is registered, for example.
See screenshots.
For email, the mask can be as follows:
*@*.*
where * is any character that is acceptable for creating email addresses.
These functions need to work when the form is filled out:
Leave a message in this thread and the user's contacts will be shown to you
Ustimenko Igor OneBox production wrote: there is an opportunity to insert scripts for the form, write yourself expressions in JS and you don't need to refine anything
and can you give an example of such a script to enter the phone? I will be very grateful for your help
[quote]
Ustimenko Igor
OneBox production wrote:
there is an opportunity to insert scripts for the form, write yourself expressions in JS and you don't need to refine anything
[/quote]
and can you give an example of such a script to enter the phone?
I will be very grateful for your help
there is an opportunity to insert scripts for the form, write yourself expressions in JS and you don't need to refine anything
and can you give an example of such a script to enter the phone?
I will be very grateful for your help
This is the code suggested by artificial intelligence
***
const mask = "+99(999)999-99-99";
const input = document.querySelector("#phone");
// Set the mask for the input field
input.addEventListener("input", (e) => {
let value = e.target.value;
value = value.replace(/[^0-9\.]/g, "");
value = value.replace(/\./g, "-").replace(/\(/g, "").replace(/\)/g, "");
e.target.value = mask.replace(/9/g, value);
});
***
Tell me, please. how can you check?
Where should you paste this code to make it work
[quote]
[file]21653[/file]
Legeza Vyacheslav
[file]21653[/file]
iCOLOR OneBox (FOP LEGEZA VIACHESLAV VALERIANOVYCH) wrote:
[file]21653[/file]
[quote]
[file]21653[/file]
Ustimenko Igor
[file]21653[/file]
OneBox production wrote:
[file]21653[/file]
there is an opportunity to insert scripts for the form, write yourself expressions in JS and you don't need to refine anything
[file]21653[/file]
[/quote]
[file]21653[/file]
and can you give an example of such a script to enter the phone?
[file]21653[/file]
I will be very grateful for your help
[file]21653[/file]
[/quote]
[file]21653[/file]
This is the code suggested by artificial intelligence
[file]21653[/file]
***
[file]21653[/file]
const mask = "+99(999)999-99-99";
[file]21653[/file]
const input = document.querySelector("#phone");
[file]21653[/file]
// Set the mask for the input field
[file]21653[/file]
input.addEventListener("input", (e) => {
[file]21653[/file]
let value = e.target.value;
[file]21653[/file]
value = value.replace(/[^0-9\.]/g, "");
[file]21653[/file]
value = value.replace(/\./g, "-").replace(/\(/g, "").replace(/\)/g, "");
[file]21653[/file]
e.target.value = mask.replace(/9/g, value);
[file]21653[/file]
});
[file]21653[/file]
***
[file]21653[/file]
Tell me, please. how can you check?
[file]21653[/file]
Where should you paste this code to make it work
[file]21653[/file]
[file]21653[/file]
there is an opportunity to insert scripts for the form, write yourself expressions in JS and you don't need to refine anything
and can you give an example of such a script to enter the phone?
I will be very grateful for your help
This is the code suggested by artificial intelligence
***
const mask = "+99(999)999-99-99";
const input = document.querySelector("#phone");
// Set the mask for the input field
input.addEventListener("input", (e) => {
let value = e.target.value;
value = value.replace(/[^0-9\.]/g, "");
value = value.replace(/\./g, "-").replace(/\(/g, "").replace(/\)/g, "");
e.target.value = mask.replace(/9/g, value);
});
***
Tell me, please. how can you check?
Where should you paste this code to make it work
in the gear on the right there is a design setting and there insert
alas, they will check the code you gave me, I won’t) try to figure it out yourself
[quote]
[file]21653[/file]
Legeza Vyacheslav
[file]21653[/file]
iCOLOR OneBox (FOP LEGEZA VIACHESLAV VALERIANOVYCH) wrote:
[file]21653[/file]
[quote]
[file]21653[/file]
Legeza Vyacheslav
[file]21653[/file]
iCOLOR OneBox (FOP LEGEZA VIACHESLAV VALERIANOVYCH) wrote:
[file]21653[/file]
[quote]
[file]21653[/file]
Ustimenko Igor
[file]21653[/file]
OneBox production wrote:
[file]21653[/file]
there is an opportunity to insert scripts for the form, write yourself expressions in JS and you don't need to refine anything
[file]21653[/file]
[/quote]
[file]21653[/file]
and can you give an example of such a script to enter the phone?
[file]21653[/file]
I will be very grateful for your help
[file]21653[/file]
[/quote]
[file]21653[/file]
This is the code suggested by artificial intelligence
[file]21653[/file]
***
[file]21653[/file]
const mask = "+99(999)999-99-99";
[file]21653[/file]
const input = document.querySelector("#phone");
[file]21653[/file]
// Set the mask for the input field
[file]21653[/file]
input.addEventListener("input", (e) => {
[file]21653[/file]
let value = e.target.value;
[file]21653[/file]
value = value.replace(/[^0-9\.]/g, "");
[file]21653[/file]
value = value.replace(/\./g, "-").replace(/\(/g, "").replace(/\)/g, "");
[file]21653[/file]
e.target.value = mask.replace(/9/g, value);
[file]21653[/file]
});
[file]21653[/file]
***
[file]21653[/file]
Tell me, please. how can you check?
[file]21653[/file]
Where should you paste this code to make it work
[file]21653[/file]
[file]21653[/file]
[/quote]
[file]21653[/file]
in the gear on the right there is a design setting and there insert
[file]21653[/file]
alas, they will check the code you gave me, I won’t) try to figure it out yourself
[file]21653[/file]
Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter.
Log in and comment
Donate
You don't have enough funds in your account Top up