How to get Repeter fields data?

Solved

How to get Repeter fields data?

Hitesh
Shopify Partner
13 1 1
I have used this App: ACF: Metafields Custom Fields: https://apps.shopify.com/advanced-custom-field
 
I have added a ticket for the last 15 days. But I have not received any response yet.
 
I have created the single-text Repeter field. now, I need to get the data. We have used the below code and we have not get the proper data.
 
 
 <b>Single Text Repeter</b>{{ page.metafields.page_info.short_desc }}
  {% for value in page.metafields.page_info.short_desc %}
 {{value}}
  {% endfor %}
 
 
Password: hitesh
 
======
Output
======
 
Single Text Repeter["Test Short Description 1","Test Short Description 2","Test Short Description 3"]
 
I need Output as the below format.
 
Single Text Repeter 
Test Short Description 1
Test Short Description 2
Test Short Description 3
 
Please help me ASAP.
Accepted Solution (1)

Hitesh
Shopify Partner
13 1 1

This is an accepted solution.


{% assign metafield_1 = page.metafields.page_info.short_desc %}

{% for i in metafield_1 %}
<p>{{ page.metafields.page_info.short_desc[forloop.index0] }}</p>
{% endfor %}

 

Using the above code, I got the below output.

 

Single Text Repeter 
Test Short Description 1
Test Short Description 2
Test Short Description 3

View solution in original post

Replies 2 (2)

Hitesh
Shopify Partner
13 1 1

This is an accepted solution.


{% assign metafield_1 = page.metafields.page_info.short_desc %}

{% for i in metafield_1 %}
<p>{{ page.metafields.page_info.short_desc[forloop.index0] }}</p>
{% endfor %}

 

Using the above code, I got the below output.

 

Single Text Repeter 
Test Short Description 1
Test Short Description 2
Test Short Description 3
Hitesh
Shopify Partner
13 1 1
I have used the above code, and it is working fine. But I have fetched only one repeter group value.
 
 
password: hitesh
 
Hitesh_0-1743160744254.png

 

Hitesh_1-1743160757215.png

 

Hitesh_3-1743160782193.png
 
Below is my code
 
<div class="row">
          {% assign table_title = product.metafields.page_info.table_title %}
          {% for i in table_title %}
            <div class="col-md-4">
              <div class="table-responsive">
                <table class="table">
                  <thead>
                    <tr>
                      <th colspan="2">
                        <span>{{ product.metafields.page_info.table_title[forloop.index0] }}</span>
                      </th>
                    </tr>
                  </thead>
                  <tbody>
                    {% assign cell1 = product.metafields.product_info.cell1 %}
                    {% assign cell2 = product.metafields.product_info.cell2 %}
                    {% for j in table_title %}
                      <tr>
                        <th>
                          <span>{{ product.metafields.page_info.cell1[forloop.index0] }}</span>
                        </th>
                        <td>
                          <span>{{ product.metafields.page_info.cell2[forloop.index0] }}</span>
                        </td>
                      </tr>
                    {% endfor %}
                  </tbody>
                </table>
              </div>
            </div>
          {% endfor %}
        </div>
 
Hitesh_5-1743160829450.png