How to read all the label values in a mobilecollapsblock

This forum contains topics that were moved from Get Satisfaction
Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

Post by Enfiled Riders »

I have a mobilecollapsblock component which has a label inside each mobilecollapscontent.

How can I read all the label text values?

Thanks,

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

How to read all the label values in a mobilecollapsblock

Post by Serhii Kulibaba »

Hello Enfiled,

Please use this JS code for collapsibleblock "mobilecollapsblock":

var labes = Apperyio("mobilecollapsblock").find('[data-role="appery_label"]').text();

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

Post by Enfiled Riders »

This code just shows me the first item.
How do I iterate to show all the labels?

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

Post by Enfiled Riders »

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

Post by Enfiled Riders »

Hello the issue is still not solved!

How do i iterate between the collapsible list labels?

Thanks,

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to read all the label values in a mobilecollapsblock

Post by Yurii Orishchuk »

Hi Enfiled,

Here is how you can implement such logic:

pre

var collapsibles = jQuery('[name="mobilecollapsblock"]');

var allText = "";

for(var i = 0; i < collapsibles&#46;length; i++){
var currentText = jQuery(collapsibles)&#46;find('[name="labelName"]')&#46;text();

Code: Select all

  allText += currentText + " "; 

};

console&#46;log("allText = " + allText);

/pre

Regards.

Post Reply