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.

Order form, with quantities, showing 125 items

  1. Greetings Gravity Formers,

    I assume GF can do what I need it to but I’m not sure how.

    I have a client who wants a menu order form.

    Details:
    10 categories with total of 125 items
    Needs to have price and quantity box for each so that a customer can order multiples of 1 item.
    Summary should show total.
    Confirmation Email should be sent to customer specifying complete order and total.
    No eCommerce/PayPal or any payment needed.

    So, as mentioned, I assume GF can do this. My question is how?
    Can GF create a form by pulling form elements from a custom post type?

    Let’s say I create a custom post type called Menu Items.
    Each has a Title, Description, Category, and custom meta field called Price.

    Can a Gravity Form query all active Menu Items, sorted by category, each item showing a price, with a form field for quantity, and when user enters a quantity, the form tallies the total of the order, on submit the order is sent to admin, with confirmation to user.

    Please let me know. Thanks so much!

    Posted 6 years ago on Wednesday November 14, 2012 | Permalink
  2. Moved to the regular support forums.

    Posted 6 years ago on Saturday November 17, 2012 | Permalink
  3. 10 categories with total of 125 items
    Needs to have price and quantity box for each so that a customer can order multiples of 1 item.
    Summary should show total.
    Confirmation Email should be sent to customer specifying complete order and total.
    No eCommerce/PayPal or any payment needed.

    This is all possible. Use product fields so that the total can be added automatically.

    For the rest, sounds like you need to dynamically populate your form. You need to look into the gform_pre_render filter. http://www.gravityhelp.com/documentation/page/Gform_pre_render

    There is an example showing how to populate a drop down with posts from a certain category. You could use a similar process to populate your form from a custom post type.

    Posted 6 years ago on Saturday November 17, 2012 | Permalink
  4. Greetings Chris,
    Thanks for the suggestions above.
    Quick background – I'm creating a menu for a catering company.
    After reading the above, I understand how the gform_pre_render filter works. And I was able to duplicate the example.
    However, since I need to create the entire form from my Custom Post Entries, I need to loop through the data earlier than the field choices in the examples provided.
    I know how to query to get the posts. But I don't know how to match the queried post data to the form elements/structure.
    Basically, here's my sitch: I'll have 10 categories, so it'll be something like,
    Foreach category, loop through the posts and display a form field for each post.
    From each post, I'll have title, description, price, and maybe another piece of data (added as custom field to my post) that I'll want to insert like "unit" – since some item prices on my menu will be "per person" while others will be "each." Those will just be a string, displayed so that customers understand what they're ordering.
    Anyway, I need each of the form fields to be a Product Field. Again, I don't know how to pair the form elements with the data from the custom posts. If anyone can point me in the right direction on this, that'd be awesome.
    Much thanks!

    Posted 6 years ago on Monday April 1, 2013 | Permalink
  5. This customization is beyond the support we can give in the support forums. You're on the right track with gform_pre_render. You're going to have to do everything before the form is rendered though. You might want to post this on our job board to solicit other input http://www.gravityhelp.com/forums/forum/job-board

    Posted 6 years ago on Monday April 1, 2013 | Permalink
  6. Thanks Chris,
    Ok. Given your response above, I'm not going to create form fields dynamically from Custom Posts anymore.
    Next question:
    I have 125 products, in 11 categories. So, in order to make the form more user-friendly for my client would it be possible to create 11 different forms in the GF admin area – one for each category – then compile and display them, or render them *into* one form with one submit button on one page?
    I've looked at a lot of the filters. But I'm not quite seeing how I might be able to do this.
    Maybe I could just filter out the form opening and closing tags completely, then I could hardcode one form opening and closing pair around my shortcodes? Is that possible?
    Again, with 125 menu items, a SINGLE form admin is cumbersome to navigate or revise, and often it seems like the form fields aren't updating properly when I create them. Sometimes I have to add descriptions several times before they actually stick.
    ANY suggestions you can provide are greatly appreciated!
    Thanks for your input.

    Posted 6 years ago on Monday April 8, 2013 | Permalink