Developer forum

Forum » Templates » Form Template Loop through fields.

Form Template Loop through fields.

Yasharth Tahiliani
Reply

Hi, 
 

I am trying to create a generic template for User generated forms using the forms for editors module within Dynamic Web.

 

I want to be able to loop through each field within the form and attach some div elements around it.

<div class="row">
  <div class="generic-form form">


    <form ID="" class="validate ajax" metod="push">
    @foreach (LoopItem i in GetLoop("Form.Fields"))
    {
      <p>Yash</p>
    }
    </form>

  </div>
</div>

This is not entering the loop. 

What is the way to achieve this?

Thanks & Regards,

Yash.


Replies

 
Yasharth Tahiliani
Reply

It's ok, it should be just Fields instead of Form.Fields in the Loop.

 

You must be logged in to post in the forum