Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter renderghost

    (@renderghost)

    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|https://';
    $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)