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.

Trying to get Time to display in Dynamic Confirmation

  1. Hi,

    First, I'm a designer, not a developer. With that said, I don't know very much php, but I know enough to get by.

    Anyway, I'm using a custom gform_pre_render function in my functions.php file in order to display a dynamic confirmation page in my Form. Basically, the form stores the form input data as variables, runs a few conditional statements, and spits out a message with the data, depending on what was entered.

    Here is my problem: The user enters the Date & Time earlier in the form, and I'm having trouble displaying the Time on the confirmation page. The date displays fine, but when I try to use the same method to display the Time, it just gives me the words "Array." This makes sense that it would be an Array... But how do I get the Time array information the user entered and store that as a variable? And then how would I display that variable as like I did the date?

    Here's my code, if it helps. I tried to comment it as best as i could:
    http://www.pastie.org/3311960

    Any help or insight would be much appreciated.

    Thanks and Best regards,
    -- Brent

    Posted 12 years ago on Friday February 3, 2012 | Permalink
  2. Hi, Brent,

    Take a look at this example I gave to someone else that wanted to set a date for their post based on user selection of a date from the calendar picker and the time from drop downs. You will see how the time is broken up into hours and minutes.

    http://www.gravityhelp.com/forums/topic/creating-publish-date-from-date-field

    I think this will get you to where you are trying to go.

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  3. Dana, Thanks so much for the response. I'll take a look.

    Posted 12 years ago on Monday February 13, 2012 | Permalink

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