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

190
Views
How to do a tag labelling option with HTML JS

Actually i want to do a tag management module like git lab tag management option in issues

How can i do with dynamic tags

enter image description here

sample Code

  <select class="form-control" id="label"  name="label">
    <option value="value" style="background-color:green" >Green</option>
 <option value="value" style="background-color:red" >red</option>
   </select>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

  <div class="container">
     <select name="label[]" multiple="multiple" id="label-list">
            @foreach ($labels as $label)
               <option value="{{ $label->id }} class="{{$label->color}}" >{{ $label->name }}</option>
              @endforeach
        </select>
   </div>

 <script>
 $("#label-list").select2({
      width: "100%",
    templateSelection: function (data, container) {
        
      $(container).css("background-color", data.element.className);
      return data.text; 
     },
  });


});
 </script>
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!