Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-18T13:43:07.783Z
Answers.LastActivityDate: 2018-12-18T13:43:07.783Z
Answers.UserDisplayName: Seth Warburton
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-17T14:12:41.273Z
Comments.Text: 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...
Comments.UserDisplayName: Jalen Davenport
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T16:13:02.140Z
Comments.Text: What is the relation between Parent and Children ?
  
  Is Parent a userRole dans Children an Entry (channel type) related to the specific user?
Comments.UserDisplayName: Maxime Lafrenière
Tags: <children>
Title: Craft 2, child dropdown, database
ThreadText: # 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 `<select>` 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:
  
  ```
  <label for="yourField">Your Field</label>
  <select id="yourField" name="yourFieldHandle">
  
    {% set dropdownField = craft.fields.getFieldbyHandle('yourFieldHandle') %}
    {% for option in dropdownField.settings.options %}
      <option value="{{ option.value }}">{{ option.label }}</option>
    {% endfor %}
  
  </select>
  
  ```
  
  …replacing `yourFieldHandle` with the handle of your field, e.g.: `children`.
  
  
  ---
  
  