Hi all
In PHPR10 list page I wish to get the field values of a row that have a 'selected' checkbox.
I've exhausted my Javascript experience (+ examples I find in this forum + other Javascript forums).
Please help me on how to do this?
--------------
I see these examples:
1) Get all checkbox values but I've no understanding how to get the associated 'data-record-id' for the row.
var selected = new Array();
$("input[name='selection[]']:checked").each(function() {
selected.push($(this).attr('value'));
});
2) Access each record's field values and then control of the record's associated checkbox:
var recsId = pageObj.inlineEdit.getRecsId();
for (i in recsId) {
if (Number($("span[id='edit"+recsId[i]+"Horsepower']").html())>200)
$("input[name='selection[]'][id='check1"+recsId[i]+"']").attr('checked','checked');
}
I guess I need to:
- traverse 'selection[]' array to retrieve each entries parent 'data-record-id',
- find all 'span class' with same 'data-record-id' value,
- retrieve 'val' for that 'span'.
Thanks for any advice.