Answers.Body: <p>The issue is you don't have a variable named <code>input</code>. I changed the code a little by included a variable named <code>value</code>. To make sure the proper option is selected you would need to pass back to the template a url param <code>name</code> with the currently selected option value.  If there is a param and it has a value it will add that value to the variable <code>value</code> if not <code>value</code> will be blank.</p>
  
  <pre><code>&lt;label&gt;Position Applying For&lt;/label&gt;
  {% set value = craft.request.getParam("name")?? "" %}
  &lt;select name="{{ positionApplyingFor.handle }}"&gt;
      {% for entry in craft.entries.section('careers') %}
          &lt;option value="{{ entry.title }}" {% if value == entry.title %}selected{% endif %}&gt;
              {{ entry.title }}
          &lt;/option&gt;
      {% endfor %}
  &lt;/select&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-17T09:28:38.773Z
Answers.Text: Hi, thanks for your help.  It seems that on submission the FreeForm ignores whatever Labels and Values are shown on the front end in favour of whatever is added to the Select field in the Composer - even if left blank.  I tried adding tags but it just gives me tags back.    Is it actually possible to have a dynamic Select menu?
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-18T14:49:33.610Z
Answers.Text: This is possible.  In the past I have setup a route then using javascript to call the route via ajax to retrieve the new options and append them to the select node element.
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T16:36:00.190Z
Answers.Text: If you're using a Select field type for the field, you would need to use a Text field type instead, as Select/Checkbox Group/Radio fields do not allow dynamic values at this time. This is something however, that we may add in the future though. :)
Answers.UserDisplayName: Solspace
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T16:42:55.683Z
Answers.Text: No, i'm just trying to pull the Entry Title from the "careers" Section.  This is working fine on the Front End but the values are not pulled through to the 'Submissions".
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T16:53:33.233Z
Answers.Text: You mean when you view the submission in the CP, the value does not show for it? What type of field is it?
Answers.UserDisplayName: Solspace
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-20T09:17:52.657Z
Answers.Text: Hi, it's just a plain text field... the default 'Title' field.
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-22T09:57:38.867Z
Answers.Text: Bump:  Might be better if I explain the context.  I have a careers section with a generic application form.  Each job is an entry.  On the form I have a Select menu where the applicant can select which job they're applying for.  I have this side working, however whatever is selected is not pulling through to the admin, the values are being dropped for whetever default value has been added in the composer, even if no values have been added (blank).
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-22T11:37:02.783Z
Answers.Text: Sorry: An update on this...   It seems the Select field value IS being used and can be seen on the submissions listing page in the admin.   It is NOT shown when viewing an individual submission OR being passed into the notification email.
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-16T20:28:54.593Z
Answers.LastActivityDate: 2017-01-17T01:35:18.537Z
Answers.LastEditDate: 2017-01-17T01:35:18.537Z
Answers.UserDisplayName: a-am
Body: <p>Im trying to use entry titles as options in a select field, <a href="https://solspace.com/craft/freeform/docs/formatting-templates/" rel="nofollow noreferrer">similar to the last example on this page in the docs</a></p>
  
  <p>My code looks like this:</p>
  
  <pre><code>&lt;label&gt;Position Applying For&lt;/label&gt;
  &lt;select name="{{ positionApplyingFor.handle }}"&gt;
  {% for entry in craft.entries.section('careers') %}
    &lt;option value="{{ entry.title }}"&gt;
      {{ entry.title }}
    &lt;/option&gt;
  {% endfor %}
  &lt;/select&gt;
  </code></pre>
  
  <p>Although the form submits, the fields content is not shown in the admin.</p>
  
  <p>If I add {% if field.value == entry.handle %} selected{% endif %}, I get the error "Variable "field" does not exist"</p>
  
  <p>Any help appreciated!</p>
  
  <p>Martin</p>
  
Tags: <plugin-freeform><solspace>
Title: Loop through entry titles in a select field
ThreadText: # Loop through entry titles in a select field
  
  (Asked by: username_0 on 2017-01-16)
  
  Im trying to use entry titles as options in a select field, [similar to the last example on this page in the docs](https://username_2.com/craft/freeform/docs/formatting-templates/)
  
  My code looks like this:
  
  ```
  <label>Position Applying For</label>
  <select name="{{ positionApplyingFor.handle }}">
  {% for entry in craft.entries.section('careers') %}
    <option value="{{ entry.title }}">
      {{ entry.title }}
    </option>
  {% endfor %}
  </select>
  
  ```
  
  Although the form submits, the fields content is not shown in the admin.
  
  If I add {% if field.value == entry.handle %} selected{% endif %}, I get the error "Variable "field" does not exist"
  
  Any help appreciated!
  
  username_0
  
  **Tags:** plugin-freeform, solspace
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-16. Score: 3
  
  The issue is you don't have a variable named `input`. I changed the code a little by included a variable named `value`. To make sure the proper option is selected you would need to pass back to the template a url param `name` with the currently selected option value. If there is a param and it has a value it will add that value to the variable `value` if not `value` will be blank.
  
  ```
  <label>Position Applying For</label>
  {% set value = craft.request.getParam("name")?? "" %}
  <select name="{{ positionApplyingFor.handle }}">
      {% for entry in craft.entries.section('careers') %}
          <option value="{{ entry.title }}" {% if value == entry.title %}selected{% endif %}>
              {{ entry.title }}
          </option>
      {% endfor %}
  </select>
  
  ```
  
  > **Comments:**
  > **username_0**: Hi, thanks for your help.  It seems that on submission the FreeForm ignores whatever Labels and Values are shown on the front end in favour of whatever is added to the Select field in the Composer - even if left blank.  I tried adding tags but it just gives me tags back.    Is it actually possible to have a dynamic Select menu?  
  > **username_1**: This is possible.  In the past I have setup a route then using javascript to call the route via ajax to retrieve the new options and append them to the select node element.  
  > **username_2**: If you're using a Select field type for the field, you would need to use a Text field type instead, as Select/Checkbox Group/Radio fields do not allow dynamic values at this time. This is something however, that we may add in the future though. :)  
  > **username_0**: No, i'm just trying to pull the Entry Title from the "careers" Section.  This is working fine on the Front End but the values are not pulled through to the 'Submissions".  
  > **username_2**: You mean when you view the submission in the CP, the value does not show for it? What type of field is it?  
  > **username_0**: Hi, it's just a plain text field... the default 'Title' field.  
  > **username_0**: Bump:  Might be better if I explain the context.  I have a careers section with a generic application form.  Each job is an entry.  On the form I have a Select menu where the applicant can select which job they're applying for.  I have this side working, however whatever is selected is not pulling through to the admin, the values are being dropped for whetever default value has been added in the composer, even if no values have been added (blank).  
  > **username_0**: Sorry: An update on this...   It seems the Select field value IS being used and can be seen on the submissions listing page in the admin.   It is NOT shown when viewing an individual submission OR being passed into the notification email.  
  
  ---
  
  