What’s the proper way to pull a custom field in from one channel into a SafeCracker form which is setup for another channel? For example, here’s what I’m trying to do:
{exp:safecracker channel="employment_application" return="main/index" url_title="{segment_3}" author_only="yes" preserve_checkboxes="yes"}
<ul>
<li>
<label for="appFirstLastName">First & Last Name</label><br />
<input type="text" name="title" id="appFirstLastName" value="{title}" />
</li>
<li>
<label for="appPhoneNumber">Your Phone Number</label><br />
<input type="text" name="emp_app_phone_number" id="appPhoneNumber" value="{emp_app_phone_number}" />
</li>
...
<li>
Your Desired Position<br />
<!-- The below custom field, application_position, is actually from a different channel called 'emp_app_positions' -->
<select name="application_position" id="application_position">
{options:application_position}
<option value="{option_value}"{selected}>{option_name}</option>
{/options:application_position}
</select>
<!-- ================================================================== -->
</li>
...
<li>
Your Specialized Skills<br />
{options:emp_app_specialized_skills}
<label><input type="checkbox" name="emp_app_specialized_skills[]" value="{option_value}"{checked} /> {option_name}</label><br />
{/options:emp_app_specialized_skills}
</li>
<li>
Are You 18 Years Old or Older?<br />
{options:emp_app_18_or_older}
<label><input type="radio" name="emp_app_18_or_older" value="{option_value}"{checked} /> {option_name}</label><br />
{/options:emp_app_18_or_older}
</li>
<li>
<input type="submit" name="submit" value="Submit" />
</li>
</ul>
{/exp:safecracker}
You can see in the commented-out code above that there’s one particular field that I want to populate as a select drop-down from another channel altogether. My client asked for the ability to add/edit/remove new positions to their application, so I made a new channel, put a custom field in (called application_position), but I have no idea what I’m supposed to write in the template to grab each entry in that channel and drop it into a select drop-down.
Any tips?