How to read all the label values in a mobilecollapsblock
I have a mobilecollapsblock component which has a label inside each mobilecollapscontent.
How can I read all the label text values?
Thanks,
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
I have a mobilecollapsblock component which has a label inside each mobilecollapscontent.
How can I read all the label text values?
Thanks,
Hello Enfiled,
Please use this JS code for collapsibleblock "mobilecollapsblock":
var labes = Apperyio("mobilecollapsblock").find('[data-role="appery_label"]').text();
This code just shows me the first item.
How do I iterate to show all the labels?
Hello the issue is still not solved!
How do i iterate between the collapsible list labels?
Thanks,
Hi Enfiled,
Here is how you can implement such logic:
pre
var collapsibles = jQuery('[name="mobilecollapsblock"]');
var allText = "";
for(var i = 0; i < collapsibles.length; i++){
var currentText = jQuery(collapsibles).find('[name="labelName"]').text();
Code: Select all
allText += currentText + " ";
};
console.log("allText = " + allText);
/pre
Regards.