<blockquote>
  <p>I have all ready created form, for parents profile that has child info. On website i need to add dropdown menu, in which is information of there children, so parents when is log on website, don't need to fill out information for children, they can choose from dropdown.</p>
</blockquote>

<p>It sounds like you want to loop through the children (Entries?) and output the data as a dropdown menu...</p>

<pre><code>{% set children = craft.entries.section('children').all() %}

&lt;select name="fields[children]"&gt;
    {% for child in children %}
        &lt;option value="{{ child.id }}"&gt;{{ child.title }}&lt;/option&gt;
    {% endfor %}
&lt;/select&gt;
</code></pre>

<p>For more information, see <a href="https://craftcms.stackexchange.com/questions/2437/category-as-select-dropdown-box">this thread...</a></p>

CC BY-SA 4.0
2019-01-18T20:08:30.727Z
2019-01-18T20:08:30.727Z
Lindsey D
<p>I have created in Craft 2 CMS, under the profile of users (ex. parents), new tab for (children), where parents can fill in there children information.</p>

<p>The data is saved in a database under the craft_content</p>

<p>How can I use the dropdown in a Twig file, data for child to be shown?</p>

<p>Can anyone help with the code?</p>

<p>I have installed Neo plugin in Craft CMS</p>

CC BY-SA 4.0
2019-01-17T17:35:26.007Z
Hi Sven, it's hard to tell exactly what you're looking for here. Are you building a front-end entry form, and you need to add a dropdown menu?
Lindsey D
CC BY-SA 4.0
2019-01-18T09:01:51.343Z
I have all ready created form, for parents profile that has child info. On website i need to add dropdown menu, in which is information of there children, so parents when is log on website, don't need to fill out information for children, they can choose from dropdown.
Sven Pomykalo
<templating><database><javascript><craft2>
Craft 2, MySQL database, Twig, JavaScript files
# Craft 2, MySQL database, Twig, JavaScript files

(Asked by: username_0 on 2019-01-17)

I have created in Craft 2 CMS, under the profile of users (ex. parents), new tab for (children), where parents can fill in there children information.

The data is saved in a database under the craft\_content

How can I use the dropdown in a Twig file, data for child to be shown?

Can anyone help with the code?

I have installed Neo plugin in Craft CMS

**Tags:** templating, database, javascript, craft2

> **Comments:**
> **username_1**: Hi Sven, it's hard to tell exactly what you're looking for here. Are you building a front-end entry form, and you need to add a dropdown menu?  
> **username_0**: I have all ready created form, for parents profile that has child info. On website i need to add dropdown menu, in which is information of there children, so parents when is log on website, don't need to fill out information for children, they can choose from dropdown.  

---

## 1 answers

### Answer by username_1 on 2019-01-18. Score: 1

I have all ready created form, for parents profile that has child info. On website i need to add dropdown menu, in which is information of there children, so parents when is log on website, don't need to fill out information for children, they can choose from dropdown.

It sounds like you want to loop through the children (Entries?) and output the data as a dropdown menu...
{% set children = craft.entries.section('children').all() %}


    {% for child in children %}
        {{ child.title }}
    {% endfor %}


For more information, see this thread...


---

