Forum Discussion
DawnFriedel-9bd
7 years agoCommunity Member
Limiting Text Entry to One Character
Hi All,
I'm working on a crossword puzzle and want to restrict the text entry fields to one character.
I'm sure this can be done in JavaScript, but that is a skill I am still working on acquirin...
DawnFriedel-9bd
5 years agoCommunity Member
Here is just a snippet of the code I used.
var fields = "1DownLetter1";
(function setMaxChars(fields) {
fields.forEach(function (field, field_index) {
$('[placeholder=' + field + ']').attr('id',field);
$("#1DownLetter1").attr("maxlength","1");
$('[placeholder=' + field + ']').attr('placeholder', '');
});
})(fields);
055533140555331
5 years agoCommunity Member
HelloDawn Can you help me, how can I apply this? I've been trying this code by Execute Javascript trigger when timeline starts, but it's not working.
Related Content
- 11 months ago
- 8 months ago