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.

  • 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... Dec 17 '18 at 14:12
  • What is the relation between Parent and Children ? Is Parent a userRole dans Children an Entry (channel type) related to the specific user? Jan 29 '19 at 16:13

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 %}


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.