Viewing 11 replies - 1 through 11 (of 11 total)
  • I’m not Matt, but you can probably use this filter to achieve what you’re trying:

    vfb_prepend_confirmation

    EDIT: Nevermind i didn’t read his documentation well enough. sorry for misleading you.

    Thread Starter mollyjoon

    (@mollyjoon)

    Where do I put that? Sorry, I am only a front end developer

    First, i edited my response. 2nd, adding filters happens in your theme’s functions.php file (or in a custom plugin).

    Thread Starter mollyjoon

    (@mollyjoon)

    Okay, I see.

    Would really love to know the answer to this question! Hopefully it is possible

    ok – if you’re using vfb pro, in form-output.php on line 32 it says:

    $output = $this->confirmation();

    You can write your own filter on that line like this:

    $output = apply_filters( 'vfb_get_confirmation', $this->confirmation(), $form_id);

    And in your functions.php file, you can add this:

    add_filter( 'vfb_get_confirmation', 'my_confirmation_function', 10, 2 );
    
    function my_confirmation_function( $message, $form_id ) {
         if ( 3 === $form_id ) {
              return $message . '<br /> Today's date is: ' . date("F j, Y, g:i a");
         }
    }

    This is untested, but it’s how you would make your own filter using Matt’s current code.

    Also, if you haven’t invested the $10 to upgrade to pro, you should do that.

    Thread Starter mollyjoon

    (@mollyjoon)

    I am going to try this tonight, thank you so much for help in advance

    Oh, I purchased it last year, have been loving it! Finding features that come up as my customers use it more and more

    just for clarification i’m using VFB pro 2.2.4 so it may be a different line number or even file if you’re not using that version.

    I just started using VFB a week ago and am totally impressed with all that Matt has put into it. It’s incredible and worth much more than the $10. Many kudos to him.

    Plugin Author Matthew Muro

    (@mmuro)

    Hey, farvgnugn, I really appreciate you taking the time to help answer some questions. However, I would discourage you from advising people to modify the core code. That’s why I’ve got the hooks in there ??

    The easiest way to do what you want and not modify the code is to just create a new template page and redirect to it.

    Thread Starter mollyjoon

    (@mollyjoon)

    Can I automate a date in the template page to be a month from form submission?

    hey Matt, are you talking about this hook: vfb_action_confirmation?

    Plugin Author Matthew Muro

    (@mmuro)

    Can I automate a date in the template page to be a month from form submission?

    Sure can. Just add something like <?php echo date( 'Y-m-d', strtotime( '+1 month' ); ?>

    hey Matt, are you talking about this hook: vfb_action_confirmation?

    Yeah, the vfb_confirmation action is one option, but because it’s an action, any output will just be prepended to the confirmation message from the form settings. Which is fine if you don’t mind that. Otherwise, you can do what I mentioned above and redirect to a new page.

    The next update to VFB Pro will bring a new filter where you can append a query string to the confirmation redirects.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Automate a date in Confirmation’ is closed to new replies.