Gravity rating form and pull the data with tangible blocks

Final form product

Live Demo


Displaying collected data


Full code used

<If loop type=gravity_form_entry form_id=3>
  <div style="padding: 2rem 1.5rem 0;">
    <h2>Most recent reviews</h2>
  </div>
  <ul class="tt-loop tt-loop-list alignfull" id="review-listing">
    <Slider>
      <Loop type=gravity_form_entry form_id=3 orderby=date_created order=desc page_size=5>
        <Loop field=fields>
          <If field=id value=1>
            <Set ratingFirstName>
              <Loop field=value>
                <Field text />
              </Loop>
            </Set>
            <Else if field=id value=2 />
            <Set ratingLastName>
              <Loop field=value>
                <Field text />
              </Loop>
            </Set>
            <Else if field=id value=3 />
            <Set ratingPicture>
              <Loop field=value>
                <Field value />
              </Loop>
            </Set>
            <Else if field=id value=5 />
            <Set ratingCompany>
              <Loop field=value>
                <Field value />
              </Loop>
            </Set>
            <Else if field=id value=6 />
            <Set ratingSector>
              <Loop field=value>
                <Field text />
              </Loop>
            </Set>
            <Else if field=id value=8 />
            <Set ratingScore>
              <Loop field=value>
                <Field text />
              </Loop>
            </Set>
          </If>
        </Loop>
        <Slide>
          <li class="tt-item tt-item-card">
            <div class="tt-item-wrapper">
              <div class="tt-item-header tt-item-header-inline">
                <div class="tt-item-image tt-item-image-circle">
                  <img src="{Get ratingPicture}" />
                </div>
                <div>
                  <div class="tt-item-title">
                    <Get ratingFirstName />
                    <Get ratingLastName />
                  </div>
                  <div class="tt-item-meta">
                    <div>
                      <Get ratingSector /> at <Loop type=businesses include="{Get ratingCompany}">
                        <Field title />
                      </Loop>
                    </div>
                  </div>
                  <div class="tt-item-meta tt-item-meta-rating">
                    <If check="{Get ratingScore}" value=1>
                      ★☆☆☆☆
                      <Else if check="{Get ratingScore}" value=2 />
                      ★★☆☆☆
                      <Else if check="{Get ratingScore}" value=3 />
                      ★★★☆☆
                      <Else if check="{Get ratingScore}" value=4 />
                      ★★★★☆
                      <Else if check="{Get ratingScore}" value=5 />
                      ★★★★★
                    </If>
                  </div>
                </div>
              </div>
              <div class="tt-item-text">
                <div class="tt-item-description">
                  Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam
                  voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
                </div>
              </div>
            </div>
          </li>
        </Slide>
      </Loop>
    </Slider>
  </ul>
  <Else />
  No listings yet. Add one with the form!
</If><br>

Explaining the L&L code we wrote

Was this article helpful? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us