Hi,
I wondered if it is possible to add URL viriables on page break.
So if I press 'NEXT' to go to the next form page their will be "?step=2" added to the URL for example.
Thanks,
Tom
ps. Love this plugin!!!
Hi,
I wondered if it is possible to add URL viriables on page break.
So if I press 'NEXT' to go to the next form page their will be "?step=2" added to the URL for example.
Thanks,
Tom
ps. Love this plugin!!!
Can you give me more information on why you would want to do this?
There is this tidbit here:
http://gravitywiz.com/2012/05/04/pro-tip-skip-pages-on-multi-page-forms/
Hi David,
Thanks for your respond.
The thing is that I use the form in the context of a larger page. Let's say for example that I have a page decided in two parts: the left, and the right part.
In the left part I have the form.
In the right part I give some additional information (mostly image based).
After a page-break (So next step in the form) I want to show other content in the right side of the page and I'd know what to show based upon the URL parameters.
Thanks,
Tom
You could use this to set a session variable, or control the other side:
http://www.gravityhelp.com/documentation/page/Gform_post_paging
Thanks David for your respond.
I think this is what I need.
I stil haven't figured the whole 'hook' thing out, but I quess that's a noob-thing. Not sure where I should put that. I'll try to figure it out.
CHeers, Tom
Hooks and filters go in your theme's functions.php file. Take a look through our documentation.
http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F
Hi David,
Thanks but I give up on this one...
First of all, It's completely not clear to me where to paste the code. Your link doesn't help on that. (Sure, I found functions.php and form_display.php but then I'm lost)
Secondly, sessions variables are too much.
Just need a URL parameter saying 'p=1' or something simple like that that moves along with the current page.
This also helps with tracking dropout points (for example when using Google Analytics studying the path to the goal. I thought this would be a common thing but I guess it's not). With only session variables you cannot do that (as far as I know).
Anyway. Thanks,
Tom
The issue you are having is related to how Gravity Forms paginates its forms. It isn't really three separate pages of forms, but a single page form that looks like it is on three pages, hence why there isn't any kind of URL variable for you to hook into. When you page through the form, the URL should change, but it will be something like #3 appended to it. Can you make sure AJAX is off on your form?
Can you link to your form so I can see what you have currently?
As for where to put code. It goes in your THEME's functions.php file.
I would love to help you get this sorted if you'd continue to work with me on it.
David, you are a hero!
Here is a link to the form: http://bit.ly/TVSykP
Ajax is off yes!
Tom
Any news on this topic?
Thanks
Here is what one of our developers told me.
The trick here is to use the gform_form_tag hook and add the extra query string item with the current page number. The following code snippet should do the trick.
Just tell them to place the correct page URL.
add_filter("gform_form_tag", "form_tag", 10, 2);
function form_tag($form_tag, $form){
$form_tag = preg_replace("|action='(.*?)'|", 'action="YOUR_PAGE_URL?my_page=' . GFFormDisplay::get_source_page($form["id"]) . '"', $form_tag);
return $form_tag;
}