Enter numbers only ??

Contributor ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

Want to enter numbers only without letters?

 

++++++++++++++++++

 

setTimeout(function () {
textinputtitle.restrict = "0-9" + "٠-٩";
dom_overlay_container.children["textinputtitle"].maxLength = 1;
what_change();
}, 0);

 

==================

2021-01-06_8-54-26.jpg

Views

163

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Jan 14, 2021 Jan 14, 2021
if (!this.exectedOnce) { function inputF(e) { if (this.num == "invalid") { document.getElementById("textinputtitle").value = document.getElementById("textinputtitle").value.slice(0, -1) } } function keyupF(e) { if (!isNaN(e.key)) { this.num = e.key; } else { this.num = "invalid"; } } $("#dom_overlay_container").on("input", "#textinputtitle", inputF.bind(this)); $("#dom_overlay_container").on("keydown", "#textinputtitle", keyupF.bind(this)); this.executedOnce = true; }

Likes

Translate

Translate
Adobe Community Professional ,
Jan 06, 2021 Jan 06, 2021

Copy link to clipboard

Copied

why do you persist in using a textinput component?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 10, 2021 Jan 10, 2021

Copy link to clipboard

Copied

Because I want the user to enter a number only ??

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

??

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

?? 

setTimeout(function () {
var textinputtitle = /[^0-9]/g;
dom_overlay_container.children["textinputtitle"].maxLength = 1;
what_change();
}, 0);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 14, 2021 Jan 14, 2021

Copy link to clipboard

Copied

if (!this.exectedOnce) {
function inputF(e) {
if (this.num == "invalid") {
document.getElementById("textinputtitle").value = document.getElementById("textinputtitle").value.slice(0, -1)
}
}
function keyupF(e) {
if (!isNaN(e.key)) {
this.num = e.key;
} else {
this.num = "invalid";
}
}
$("#dom_overlay_container").on("input", "#textinputtitle", inputF.bind(this));
$("#dom_overlay_container").on("keydown", "#textinputtitle", keyupF.bind(this));
this.executedOnce = true;
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 16, 2021 Jan 16, 2021

Copy link to clipboard

Copied

Thank you very much for your kind response (^_^) , genius ...
I wish you always happiness and ease in all your affairs .

Thanks .

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 17, 2021 Jan 17, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines