<p>The correct markup is:</p>

<pre><code>{{ block[field.handle] }}
</code></pre>

<p>The final looks like this:</p>

<pre><code>&lt;input type="text" name="fields[myField][fields][{{ field.handle }}]" value="{{ block[field.handle] }}"&gt;
</code></pre>

CC BY-SA 3.0
2017-05-30T07:04:17.227Z
Can you post this including the for-loop expression that sets `block`. The code doesn’t make a whole lot of sense without.
carlcs
CC BY-SA 3.0
2017-05-30T07:07:30.037Z
Same issue with your question btw, what is `fields` or `field`?
carlcs
CC BY-SA 3.0
2017-05-29T21:04:54.363Z
2017-05-29T21:04:54.363Z
Damon
<p>I have a <code>superTable</code> field that I am trying to re-populate on my front-end form.</p>

<p>Everything is working great, I am able to populate a drop-down, but can't seem to find the magic numbers to re-populate a textfield.</p>

<pre><code>&lt;label&gt;{{ field.name }}&lt;/label&gt;
&lt;input type="text" name="fields[myField][fields][{{ field.handle }}]" class="form-control" value="{{ entry.myField[0].??? }}"&gt;
</code></pre>

<p>This works well:</p>

<pre><code>fields[myField][fields][{{ field.handle }}]
</code></pre>

<p>But, whatever I enter after that <code>.</code> Example:</p>

<pre><code>value="{{ entry.myField[0].field.handle }}"
</code></pre>

<p>I get the error that the model "field doesn't exist". If could make <code>field.handle</code> just be "myField" everything would be great. I can hard-code the field name and it works great. But, I need to be able to access the values within a loop.</p>

<p>Thank you for any suggestions!</p>

<p><strong>EDIT</strong></p>

<pre><code>value="{{ entry.myField[0].field.handle }}"
</code></pre>

<p>Is a plainTex field. This is the output I am trying to accomplish.</p>

<pre><code>&lt;input type="text" name="fields[myField][fields][{{ field.handle }}]" value="{{ entry.myField[0].field.handle }}"&gt;
</code></pre>

<templating><plugin-supertable>
How can I output the value of a superTable field within a loop?
# How can I output the value of a superTable field within a loop?

(Asked by: username_0 on 2017-05-29)

I have a superTable field that I am trying to re-populate on my front-end form.
Everything is working great, I am able to populate a drop-down, but can't seem to find the magic numbers to re-populate a textfield.
{{ field.name }}


This works well:
fields[myField][fields][{{ field.handle }}]

But, whatever I enter after that . Example:
value="{{ entry.myField[0].field.handle }}"

I get the error that the model "field doesn't exist". If could make field.handle just be "myField" everything would be great. I can hard-code the field name and it works great. But, I need to be able to access the values within a loop.
Thank you for any suggestions!
EDIT
value="{{ entry.myField[0].field.handle }}"

Is a plainTex field. This is the output I am trying to accomplish.

**Tags:** templating, plugin-supertable

---

## 1 answers

### Answer by username_0 on 2017-05-29. Score: 1

The correct markup is:
{{ block[field.handle] }}

The final looks like this:

> **Comments:**
> **username_1**: Can you post this including the for-loop expression that sets `block`. The code doesn’t make a whole lot of sense without.  
> **username_1**: Same issue with your question btw, what is `fields` or `field`?  

---

