PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Custom Fields

  1. Hi,

    Just purchased this awesome plugin today, it appears to do everything i require but for some reason i cannot get it to post the information i require?

    My form is fully made up of custom fields and i wish for the information from the forms to be put into posts on a page.

    I am not a wordpress newbie and i have a fairly good understanding about custom fields, but for some reason i cannot get this to work.

    I am using another plugin called composite post which allows me to set post templates with ease. I am not entirely sure whether it's not showing because i am using another plugin, but i've never had issues before.

    Here's my code from the template file:

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <?php $job = get_post_meta($post->ID, 'job-title', true); ?>
    <?php $business = get_post_meta($post->ID, 'company', true); ?>
    <?php $post = get_post_meta($post->ID, 'address', true); ?>
    <?php $date = get_post_meta($post->ID, 'closing-date', true); ?>
    <?php $logo = get_post_meta($post->ID, 'company-logo', true); ?>
    
    <table width="960" height="350" border="0">
      <tr>
        <td height="190" colspan="2">
          <p><?php echo $job; ?></p>
          <p><?php echo $business; ?></p>
          <p><?php echo $post; ?></p>
        </td>
        <td width="116" valign="top"><img src="<?php echo $logo; ?>" alt="company logo" width="150" height="150" /></td>
      </tr>
      <tr>
        <td width="302" height="57"><?php echo $date; ?></td>
        <td colspan="2">read more</td>
      </tr>
    </table>
    <p class="postmetadata"><?php edit_post_link('Edit', '', ''); ?></p>
    </div>

    if someone could have a look and let me know where i might be going wrong? Or an example how i can just get the info from form to post. would be helpful then i can work from there.

    Thanks

    Posted 14 years ago on Tuesday November 23, 2010 | Permalink
  2. If you are created a post then your form must also contain the Post Title and Post Body fields. If all you are using are the Post Custom Field fields then this is why a post is not being created. A Post Title and Post Body field must also exist on the form. Do you have a Post Title and Post Body field?

    Posted 14 years ago on Tuesday November 23, 2010 | Permalink
  3. thanks for your reply, with your help i have finally got it to produce a post within wordpress but im still having some issues.

    with now adding a body post field in the form, i now have an extra blank field which i do not need but i know if it's not there a post will not be created.

    so how do i work a body post field into a form with multiple fields? i.e. i have a job description, applicant requirements and salary & benefits paragraph custom fields already.

    ideally i want to keep the 3 paragraph fields seperate, but to get it to post will i have to convert all 3 of them into a individual body post fields?

    or is there another way around it?

    one last thing, even though i have successfully made the form to post within wordpress I cannot seem to format so the post will show on the site yet?

    How do i call the fields in a file?

    Thanks

    Posted 14 years ago on Wednesday November 24, 2010 | Permalink
  4. You can set the Post Body so it is hidden on the frontend. Edit the Post Body field, select the Advanced tab and set the visibility to Admin Only.

    You can only have 1 Post Body field on a form. If you want to combine multiple fields to create your Post Body then you need to use the Content Template functionality of the Post Body field to output the value of multiple fields as the value of the Post Body field. The content template functionality can be found by editing the Post Body field and then on the Properties tab there is a Content Template option.

    You said:

    "One last thing, even though i have successfully made the form to post within wordpress I cannot seem to format so the post will show on the site yet? How do i call the fields in a file?"

    I'm not exactly sure what you are asking here. Are you asking how do you put the form on a page or post so people can fill it out? Documentation on how to insert a form into a page or post can be found here:

    http://www.gravityhelp.com/documentation/embedding-a-form/

    Posted 14 years ago on Wednesday November 24, 2010 | Permalink