question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Repeater for Labels

See original GitHub issue

Is there a way for the repeater to also repeat labels with their corresponding checkboxes?

<input type="checkbox" id="myCheckbox[0]"><label for="myCheckbox[0]"></label>

repeated to

<input type="checkbox" id="myCheckbox[1]"><label for="myCheckbox[1]"></label>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
martinmurciegocommented, Sep 14, 2018

Re-Styling with Markdown only:

$('.my-repeater').repeater({
show: function () {

//fixing the issue of the labels
var params = [this];
$(this).find("label[for]").each(function(index, element) {
	var currentRepeater = params[0];
	var originalFieldId = $(element).attr("for");
	var newField = $(currentRepeater).find("input[id='"+originalFieldId+"']");
	if($(newField).length > 0)
	{
		var newFieldName = $(newField).attr('name');
		$(newField).attr('id', newFieldName);
		$(currentRepeater).find("label[for='"+originalFieldId+"']").attr('for', newFieldName);
	}
},params);					

//showing the new repeater
$(this).slideDown();

$(this).show();
}
})
3reactions
juancarlosestradanietocommented, Jul 21, 2017

Hi, I just made this, I hope it can help anybody. This plugin is very helpful. Thanks. ` $(‘.my-repeater’).repeater({ show: function () {

//fixing the issue of the labels
var params = [this];
$(this).find("label[for]").each(function(index, element) {
	var currentRepeater = params[0];
	var originalFieldId = $(element).attr("for");
	var newField = $(currentRepeater).find("input[id='"+originalFieldId+"']");
	if($(newField).length > 0)
	{
		var newFieldName = $(newField).attr('name');
		$(newField).attr('id', newFieldName);
		$(currentRepeater).find("label[for='"+originalFieldId+"']").attr('for', newFieldName);
	}
},params);					

//showing the new repeater
$(this).slideDown();

$(this).show();

} }) `

Read more comments on GitHub >

github_iconTop Results From Across the Web

Repeater Label Application - FOX IV Technologies
For applying two separate labels to the adjacent sides of cartons or pallets, FOX IV's Repeater application method is a fast, economical way...
Read more >
Repeater Tag to duplicate annotation settings - Label Studio
Customize Label Studio with the Repeater tag to repeat similar data blocks to accelerate labeling for machine learning and data science projects.
Read more >
Repeater™ Adjacent Panel Labeling Station - YouTube
Why waste space wrapping a label around the corner when you can apply labels to adjacent sides with one labeling system? The Repeater...
Read more >
Repeater Item Labels Syntax - General Support - ProcessWire
I can't quite figure out the syntax to display the `FieldSet Page`'s `Author` field as the Repeat Item Label in the repeater.
Read more >
Style applied the Label in a Repeater apply to all labels in the ...
The styling logic is organized in such a way that you can make a general style for labels, descriptions, required marks inside the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found