• Resolved moni

    (@muneeba)


    Hi.
    This is the plugin I was looking for. You have done a great job.
    Basically I am using a contact form 7 here is code:

    Post Title [text* post_title “Help Needed”]
    <p><h1>Personal Information</h1><br /></p>
    <p class=”one-half First”>[text* First-Name “First Name”]</br> </p>
    <p class=”one-half”> [text* Last-Name “Last Name”]</br> </p>
    Post Content (required)
    [checkbox* post_category_name “Help-Form”]
    <p> <h1> Please fill these fields</h1></p>

    <p class=””>Family Requiring Help : [select* Family “A” “B”]</p>

    <p class=”one-half First”>Need Language Translator : [select* Translator “No” “Yes”]</p>
    [group language]
    <p class=”one-half”>Please Select Language: [select* Language “Chinese” “Arabic” “Persian”]</p>
    [/group]
    [submit “Submit Form”] [submit “Post”]

    On submit data goes to CFDB and on Post it creates wp post But the post shows only Post Title and Post Content fields It does not showing other fields like select, check box, text, email, phone.
    Please tell me how do I show other fields .

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter moni

    (@muneeba)

    And if it should be show as meta post then please tell me how do I show.Text boxes are also not showing. Can you give hint of php code to show custom text fields?

    function form_to_post_set_values($post) {
    $post[‘first-name’] = ‘First Name’;
    return $post;
    }

    add_filter(‘form_to_post_before_create_post’, ‘form_to_post_set_values’);

    This is not working as I enter name it does not appear, am I writing right code ?

    Should I make changes in php code. Does meta work with select and radio button options.

    • This reply was modified 9 years, 6 months ago by moni.
    • This reply was modified 9 years, 6 months ago by moni.
    Plugin Author Michael Simpson

    (@msimpson)

    To consolidate multiple fields into the post content, look at “f2p_consolidate_fields” on https://ww.wp.xz.cn/plugins/form-to-post/

    To create meta fields on the post, see form_to_post_set_meta

    Thread Starter moni

    (@muneeba)

    Thank You for response.
    Now I am able to add more text fields. Can you tell me what code will be used for Select and Radio Buttons and check fields ?

    Plugin Author Michael Simpson

    (@msimpson)

    Select and Radio fields submit text values just like text fields. They are treated the same way.

    Thread Starter moni

    (@muneeba)

    Thank you so much for your support. Great Plugin. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Contact Form 7 Fields’ is closed to new replies.