Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

108
Views
Uneditable characters in textarea using jquery

I have to show some blank fillups in textarea. After every fillups there is fullstop, User can type anything in fill ups. But the full stop should be fixed they cannot delete the full stop. Any solution . Thanks

_______________ . _____________________ . ________________________ .

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Impossible to achieve using a textarea.
But using some inputs, it is possible. You just need to work on your CSS to make it look as you wish... Like in a larger box.

let fillup = $(".fillup")

fillup.on("keydown", function(e) {
  let val = this.value
  if (val.length == $(this).attr("maxlength")) {
    $(this).next(".fillup").focus()
  }
  if (e.key === "Backspace" && val.length === 0) {
    $(this).prev(".fillup").focus()
  }
})
fillup.first().focus()
input {
  width: 2.7em;
  border: 0;
  border-bottom: 1px solid cyan;
}

input:focus {
  outline: none;
}

.box {
  border: 1px solid grey;
  padding: 0.5em 3em;
  border-radius: 3px;
  width: 8em;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="box">
  <input class="fillup" maxlength="5" /></input>.<input class="fillup" maxlength="5" /></input>.<input class="fillup" maxlength="5" /></input>
</div>

about 4 years ago · Juan Pablo Isaza Report

0

Check it out

<div><textarea></textarea></div>
<style>
textarea{
     outline:none;
     border:none;
     border-bottom:1px solid #888;
}
div::after{
     content:".";
}
</style>

You can use input too instead of textarea

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!