Title: renderghost's Replies | WordPress.org

---

# renderghost

  [  ](https://wordpress.org/support/users/renderghost/)

 *   [Profile](https://wordpress.org/support/users/renderghost/)
 *   [Topics Started](https://wordpress.org/support/users/renderghost/topics/)
 *   [Replies Created](https://wordpress.org/support/users/renderghost/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/renderghost/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/renderghost/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/renderghost/engagements/)
 *   [Favorites](https://wordpress.org/support/users/renderghost/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [query_posts result into an array for contact form pull-down list](https://wordpress.org/support/topic/query_posts-result-into-an-array-for-contact-form-pull-down-list/)
 *  Thread Starter [renderghost](https://wordpress.org/support/users/renderghost/)
 * (@renderghost)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/query_posts-result-into-an-array-for-contact-form-pull-down-list/#post-842815)
 * Ok I got the form half built.
 *     ```
       <?php
   
       $fields['label'][0]  ='Your Name|Your Name';
       $fields['type'][0]   ='textfield';
       $fields['isreq'][0]  ='0';
       $fields['isemail'][0]='0';
       $fields['isclear'][0]='1';
   
       $fields['label'][1]  ='Email';
       $fields['type'][1]   ='textfield';
       $fields['isreq'][1]  ='0';
       $fields['isemail'][1]='1';
   
       $fields['label'][2]   ='Website|http://';
       $fields['type'][2]    ='textfield';
       $fields['isreq'][2]   ='0';
       $fields['isemail'][2] ='0';
   
       $fields['label'][3]='Job Title|Please pick a job title|-';
   
       // I need to pull a list of post titles in category '7' and pass them to the drop down select box
       // I don't know how to code this bit
       // 1) create an string of post titles using query_posts or WP-query???
       // 2) feed it to the field array ??
   
       $fields['type'][3]   ='selectbox';
       $fields['isreq'][3]  ='1';
       $fields['isemail'][3]='0';
   
       $fields['label'][4]   ='CV upload';
       $fields['type'][4]    ='upload';
       $fields['isreq'][4]   ='0';
   
       $fields['label'][5]   ='Demo upload';
       $fields['type'][5]    ='upload';
       $fields['isreq'][5]   ='0';
   
       $fields['label'][6]   ='Answer this question';
       $fields['type'][6]    ='verification';
       $fields['isreq'][6]   ='1';
   
       insert_custom_cform($fields,8);    //Call form #8 with new fields
   
       ?>
       ```
   
 * I need some help pulling in the post titles from category id=7.
 * Anyone?

Viewing 1 replies (of 1 total)