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.

Relationship Between Post and Form Fields

  1. I found this thread that might contain my answer but still need to ask again: http://www.gravityhelp.com/forums/topic/view-form-content-on-public-front-end-page-of-site

    I'm trying to build a directory site with a custom post type and a GF for user submission. I am making progress but its a bit slow.

    So, I have my CPT and I can link a form to it. Now I can't work out how to display submitted content. I have tried creating single-listing.php and archive-listing.php without success.

    If I am using post fields in the form I think they should be added to a post without extra work/code but other fields (standard and advanced) will not unless I work some php magic in the loop. Is that right?

    So say I want a user to add an address I could use a post field and WordPress will call that but the address field in advanced fields won't be unless I use some code somewhere.

    So, if I am using post fields would I still need to modify the loop or not?

    I'm sorry if I am not making myself very clear but this is where I'm at. Is it obvious that I'm not so good with code?

    Thanks

    Martin

    Posted 11 years ago on Monday March 4, 2013 | Permalink
  2. When you collect data to create a post, the post body and post title are the only pieces which will be displayed on the post by default. If you collect other information in the form, you will have to insert them into the post manually. You can do this by configuring the content template. There is a checkbox on the post body field which says "Create content template". Check that, then in the box below, add the fields from the drop down. That will insert the collected data into the post body. You will have to add your own HTML to ensure that the resulting post looks like you want.

    Posted 11 years ago on Tuesday March 5, 2013 | Permalink
  3. Boom!

    I think I get that.

    Thanks Chris.

    Posted 11 years ago on Tuesday March 5, 2013 | Permalink
  4. I like hearing Boom! Glad you got a handle on it now. If you need more specific help after you get started, just let us know.

    Posted 11 years ago on Thursday March 7, 2013 | Permalink
  5. Just a follow up question on that. I see that you say it is HTML in the post body / insert merge tag. The example I saw in the documentation had text {fiedname:id} . My question is: can I use any html tags in this field? Say I have a post field called {website:10} can I do this?
    Website: <link href="{Website :25}" />

    Here is a link to the form. It is still under construction of course.
    http://www.vintagedancer.com/gents-and-dames/

    Posted 11 years ago on Thursday March 21, 2013 | Permalink
  6. You can use any HTML you want. You can do exactly that, wrap your merge tag in an HTML img or a href tag to embed an image or link the text.

    Posted 11 years ago on Sunday March 24, 2013 | Permalink