<p>If I understand correctly, you want to create a <code>&lt;select&gt;</code> element with options from fields you already setup in the CMS. In that case you can use something like this to get the data for the field:</p>

<pre><code>&lt;label for="yourField"&gt;Your Field&lt;/label&gt;
&lt;select id="yourField" name="yourFieldHandle"&gt;

  {% set dropdownField = craft.fields.getFieldbyHandle('yourFieldHandle') %}
  {% for option in dropdownField.settings.options %}
    &lt;option value="{{ option.value }}"&gt;{{ option.label }}&lt;/option&gt;
  {% endfor %}

&lt;/select&gt;
</code></pre>

<p>…replacing <code>yourFieldHandle</code> with the handle of your field, e.g.: <code>children</code>.</p>

CC BY-SA 4.0
2018-12-18T13:43:07.783Z
2018-12-18T13:43:07.783Z
Seth Warburton
<p>I am running Craft 2 CMS for one website. Its in Norwegian for our client.</p>

<p>Its about SKI School. Where Parents reserves sport dates for there children. In database there are parents profile with there children information, date of birth and names in craft_content.</p>

<p>I need to have on website dropdown, when parents login and go to sport dates, they can choose there children, instead of writing it, they choose also dates when there children participate, and price is multiple for chosen dates, on end they see total for payment, they can reserve, and pay later/or at once?</p>

<p>Is there solution for it. I have twig file for templates.</p>

CC BY-SA 4.0
2018-12-17T14:12:41.273Z
Please update this question with more information on what you're trying to accomplish. I'm currently quite lost as to what you're asking...
Jalen Davenport
CC BY-SA 4.0
2019-01-29T16:13:02.140Z
What is the relation between Parent and Children ?

Is Parent a userRole dans Children an Entry (channel type) related to the specific user?
Maxime Lafrenière
<children>
Craft 2, child dropdown, database
# Craft 2, child dropdown, database

(Asked by: username_0 on 2018-12-17)

I am running Craft 2 CMS for one website. Its in Norwegian for our client.

Its about SKI School. Where Parents reserves sport dates for there children. In database there are parents profile with there children information, date of birth and names in craft\_content.

I need to have on website dropdown, when parents login and go to sport dates, they can choose there children, instead of writing it, they choose also dates when there children participate, and price is multiple for chosen dates, on end they see total for payment, they can reserve, and pay later/or at once?

Is there solution for it. I have twig file for templates.

**Tags:** children
> **Comments:**
> **username_1**: Please update this question with more information on what you're trying to accomplish. I'm currently quite lost as to what you're asking...  
> **username_2**: What is the relation between Parent and Children ?  Is Parent a userRole dans Children an Entry (channel type) related to the specific user?  

---

## 1 answers

### Answer by username_3 on 2018-12-18. Score: 1

If I understand correctly, you want to create a  element with options from fields you already setup in the CMS. In that case you can use something like this to get the data for the field:
Your Field


  {% set dropdownField = craft.fields.getFieldbyHandle('yourFieldHandle') %}
  {% for option in dropdownField.settings.options %}
    {{ option.label }}
  {% endfor %}



…replacing yourFieldHandle with the handle of your field, e.g.: children.


---

