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.

Pulling content from posts into forms

  1. Zandergrin
    Member

    HI,

    Just want to check a bit of functionality before I purchase.

    I have a selection of products on my site which need to be purchased in conjunction with some extras - each extra is a product in itself and has its own post in wordpress - these extras are then assigned by category to the product they can be added to.

    When I am building a form can I pull information from those posts into the form -
    For example when I build my purchase form for "product one" can I list all posts in the category "extras for product 1" with a thumbnail, excerpt and checkbox into the form? The user then checks which products they want to add to their order.

    in another way is there a way to pull contents of posts into the forms? I dont mind doing this with template hooks and a buit of fiddle-dee-dee (as long as its not rocket science!)

    I hope this makes sense - thanks in advance.

    Posted 12 years ago on Tuesday May 1, 2012 | Permalink
  2. Do you happen to have a working site or visual example of this? How many product/option variations are we talking here? I'm trying to brainstorm the best way to do this with GF.

    Posted 12 years ago on Tuesday May 1, 2012 | Permalink
  3. Zandergrin
    Member

    Sure - I have a visual - is there any way to privately email you?

    Posted 12 years ago on Wednesday May 2, 2012 | Permalink
  4. Sure thing - rob@rocketgenius.com

    Posted 12 years ago on Wednesday May 2, 2012 | Permalink
  5. Zandergrin
    Member

    Hi Rob,

    I've sent you through designs by email - dont mind discussing the answer in public, just want to keep the designs private for now.

    Cheers,

    Posted 12 years ago on Friday May 4, 2012 | Permalink
  6. Hi Zendergrin,

    Rob shared your designs with me. First off, awesome work! They look great.

    What you want to accomplish is possible; however, it is a fairly involved customization. The solution that involves the least amount of code would likely be to first use this snippet as your baseline:

    http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields

    The first difference is that you will be populating a checkbox field rather than a drop down field; however, they can be populated via the same method.

    The next difference is that everything but the checkbox itself (thumbnail, excerpt text, label text, etc) will need to be created as a string and loaded inside the label property (the label property supports HTML). This part gets a little weird and will definitely require a solid working knowledge of CSS to accomplish. After you have added all the required content to your label, use absolute or relative positioning to put the checkbox where you want it in relation to the label content.

    Kind of messy... not super elegant, but it only requires that bit of pre render code to function.

    Posted 12 years ago on Friday May 4, 2012 | Permalink
  7. Zandergrin
    Member

    OK, great - sounds do-able.

    I might come back asking for specifics once I get into the build. Thanks again for all your help,

    Posted 12 years ago on Tuesday May 8, 2012 | Permalink
  8. Right on, glad to help out.

    Posted 12 years ago on Tuesday May 8, 2012 | Permalink

This topic has been resolved and has been closed to new replies.