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

73
Views
HTML Textarea partially editable

I want a textarea to be partially editable. The first column should be not editable and the second should be the place where the user will input this "answer".

The first column is people early, late and night and everything after that the user should be able to insert and everything before should readonly.

The script is only working for inline text but my text should be row1, row2 and row3 and I do not know how do it.

$('#people').keydown(function() {
  if ($(this).val().indexOf('people early: 
      people late:
      people night: ') !== 0) {
    var length = "This is constant.  ".length;
    var current = $(this).val();
    var after = current.slice(length);

    $(this).val("This is constant.  " + after);
  }
});
<textarea id="people">
     people early: 
     people late:
     people night:
    </textarea>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

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

0

I assume you should use 3 different inputs to get the 3 information you want then format a string to makes it look how you want it to be.

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!