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.

Not fully able to build form programatically

  1. I'm trying to automate form creation so that whenever a new post of a certain post type is created, it generates a new form with a product field populated with the values of several custom fields.

    I'm achieving this by inserting new records into the wp_rg_form and wp_rg_form_meta tables, but when creating the wp_rg_form_meta record I'm a little uncertain about whether I need to have a unique id within the confirmations and notifications fields. I'd like to not have notifications at all, and have been using "a:0:{}" as the default value for that column.

    My question is, is there a better way to create forms like this, with native Gravity Forms methods rather than by manipulating the database manually? And if not, how is the id in the confirmations field generated, and is that even necessary to submit the form? I'm having an issue integrating forms created this way with Cart66; products associated with these forms tend to have a price of $0.00 when added to the cart. I'd like to make sure I'm generating these forms properly.

    Posted 11 years ago on Tuesday May 21, 2013 | Permalink
  2. David Peralty

    You shouldn't be building forms programatically and this is not something we support doing. Instead, you could create the forms using our form builder and then pre-populating them programatically. You can have the same form on multiple posts or pages, with different information loaded into each one.

    Posted 11 years ago on Tuesday May 21, 2013 | Permalink
  3. Cart66 only supports a 1 to 1 relationship between products and forms. There needs to be a separate form for every product, and the total number of products is going to be in the thousands. Is there any way at all to automate the form creation process?

    Posted 11 years ago on Tuesday May 21, 2013 | Permalink
  4. David Peralty

    I've sent this thread to our developers to comment on.

    Posted 11 years ago on Tuesday May 21, 2013 | Permalink
  5. Thank you.

    Posted 11 years ago on Tuesday May 21, 2013 | Permalink
  6. Just an update, I believe I've determined the cause to be the lack of notifications. The price in cart is accurate when I have one email notification set, but becomes $0.00 again when I have removed all notifications. I've filed a support request with Cart66 to resolve this, because I really don't need to receive an email every time a customer adds an item to their cart.

    Posted 11 years ago on Wednesday May 22, 2013 | Permalink
  7. David Peralty

    Here is what one of our developers has said to me:

    We don't really have an easy function for him to use in order to create a new form. Inserting records into those two tables is currently the only way of doing it. However, what he is doing is raising all sorts of red flags. Having 1000+ forms is going to create problems for him and will be a nightmare to maintain. I would try to find a different solution and maybe reach out to cart66 and see if they have any ideas on something he should do to get around that limitation of 1 form per product.

    Posted 11 years ago on Monday May 27, 2013 | Permalink
  8. I've been in contact with Cart66 regarding the notifications issue, apparently it's an issue with Gravity Forms 1.7 and they're working on a fix for that. I'll definitely link to this topic and let them know that having so many forms would be an issue, it's not something I've experienced because we don't have that many forms just yet. Thank you and your developers for your time.

    Posted 11 years ago on Tuesday May 28, 2013 | Permalink