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.

Confirmation Page Shortcodes

  1. Hello, I am trying to display the fields that were entered in the form on a confirmation page, but also want to display it with our own custom template. I have set up the majority of it thus far, using conditional php in the page.php file for the order form confirmation page.

    Two main Questions:
    1. However, I am using the URL Redirect and passing a ton of query strings. I know I must not have to do that since I am using an internal WP page to display the results. Instead of using "Get" to access the values, how do I do this within the template page?

    2. Also, I am not sure how to call the field label and description so that it can be displayed on the confirmation message as well.

    As of now, the system I have in place is working, but if the owner of the form changes the field label and/or description, I have to manually alter this file. Any help is appreciated!

    Posted 7 years ago on Wednesday August 15, 2012 | Permalink
  2. Do you have any examples of this work online, and can you post your page templates at pastie.org or pastebin.com?

    Posted 7 years ago on Wednesday August 15, 2012 | Permalink
  3. Sure.. thanks for the reply. Here is the pastie for the portion of page.php I am using currently. Like I said, I didn't think I should have to pass a query string since it is all internal to wordpress database. But, here it is as of now.. I'd like to be able to call the field labels and field descriptions instead of having those manually typed in.

    http://pastebin.com/sCUc9fix

    Thanks for any help!

    Posted 7 years ago on Thursday August 16, 2012 | Permalink
  4. Anyone there?? help!

    Posted 7 years ago on Monday August 20, 2012 | Permalink
  5. You caught us on the weekend outside support hours. Someone will take a look at this today. Thanks for your patience.

    Posted 7 years ago on Monday August 20, 2012 | Permalink
  6. Thank you so very much!

    Posted 7 years ago on Monday August 20, 2012 | Permalink
  7. Sarhjan7, can you export your form please as XML (Import/Export, then the top menu item, Export Forms) and email it to me at chris@rocketgenius.com - also, any other custom code you're using, other than what you posted at pastebin. I want to make sure the solution I give you works for your form.

    Thanks.

    Posted 7 years ago on Wednesday August 22, 2012 | Permalink
  8. Sure thing.. I'll send it right over..

    Posted 7 years ago on Wednesday August 22, 2012 | Permalink
  9. Did you get the email with the attachments?

    Posted 7 years ago on Monday August 27, 2012 | Permalink
  10. Hi. I did receive two emails and am working on this now. Thank you.

    Posted 7 years ago on Monday August 27, 2012 | Permalink
  11. I see that item #2 in this post was resolved here (you took care of that on your own):
    http://www.gravityhelp.com/forums/topic/output-field-description

    Posted 7 years ago on Monday August 27, 2012 | Permalink
  12. Rather than sending all the data in the query string, you can send the entry ID ( in a parameter like entry_id={entry_id} ) and then in your template you can retrieve all the values by using this function and the entry ID:

    [php]
    $lead = RGFormsModel::get_lead($entry_id);

    So, instead of doing this in your page.php template:

    [php]
    <?php echo $_GET['entity']; ?><?php echo $_GET['entity2']; ?><?php echo $_GET['entity3']; ?>

    You would do something like this instead

    [php]
    // do this one time to retrieve the lead
    $lead = RGFormsModel::get_lead($entry_id);
    
    // now you can access each individual field by number for this particular lead
    echo $lead[104];
    echo $lead[105];
    echo $lead[106];

    Where 104, 105 and 106 correspond to the field IDs in the entry.

    That is the general approach. Pass the entry ID only in the query string, then in your template retrieve the entry from the database and use is as $lead[fieldID] where fieldID is the numeric ID of the field you want to use to value of. If you need help with that please let us know.

    Recent discussion: http://www.gravityhelp.com/forums/topic/function-to-get-form-entry-by-id

    Posted 7 years ago on Monday August 27, 2012 | Permalink
  13. How do I display the field label and descriptions from the page.php which is showing the custom confirmation page after the form is submitted? I get how to call the lead[fieldid] for values entered, but need to call the field labels and descriptions….

    Posted 7 years ago on Friday September 7, 2012 | Permalink
  14. I described how to get the field labels and descriptions in this reply:
    http://www.gravityhelp.com/forums/topic/output-field-description#post-72797

    Posted 7 years ago on Friday September 7, 2012 | Permalink
  15. The form ID is recorded as part of the entry object.

    [php]
    // use the lead information to get the form ID
    $my_form_id = $lead['form_id'];
    
    // use the form ID to get the label and description
    $form = RGFormsModel::get_form_meta($my_form_id);
    $label = $form["fields"][FieldID]["label"];
    $description = $form["fields"][FieldID]["description"];

    Does that help?

    Posted 7 years ago on Friday September 7, 2012 | Permalink
  16. Yes, I think this is exactly what I needed! Thanks so much.

    Posted 7 years ago on Friday September 7, 2012 | Permalink
  17. Based on this and your emails I think we're good. Please start a new topic if you need additional assistance. Thanks.

    Posted 7 years ago on Saturday September 8, 2012 | Permalink

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