How do I generate dynamic form from custom field post type in Wordpress?
<p>I'm currently doing a project using Trellis/Wordpress/Sage stack. I also use a couple of plugins: "<strong>Advanced custom fields</strong>", "<strong>Custom post type UI</strong>", "<strong>Contact form 7</strong>" and an extension of Contact Form 7 called Contact form 7 dynamic text extension.</p>

<p>I have created a post type called Position, each position has description - text field, type - text field, and questions - repeater field, each subfield in questions is a text field named "question". </p>

<p>The user story in the design requires a multi-step form. In the first page, the user has to tick some check boxes - which are the questions from Position post type. Then the data will get carried over to the next form - the application form.</p>

<p>I'm having trouble with querying the subfields from Position posts and put their values in checkboxes, I can do it in plain php template file using <code>get_field()</code> and <code>get_subfield()</code> but I'm not sure how to pass them to another template in which the application form resides. I can provide further codes if required.</p>