Hi there, my URL is http://74.54.88.165/~rwatchi/. I have placed two images in the top navigation bar and each one should link to a form. The first is Email This Page, which should email the url of the page the form is filled out on. The form is set up with an Email field and a hidden field using {embed_url}. Then {embed_url} is inserted into the Body of the notification email sent to the Email address the user fills out in the form field. On the form, the Field Label is url, I have checked to allow to populate dynamically, and the Parameter Name is refurl. Looking thru the forum, I found a snippet that I put in functions.php 'add_filter("gform_field_value_refurl", "referral_url");
function referral_url($form){
//Grab URL from HTTP Server Var and put it into a variable
$refurl = $_SERVER['HTTP_REFERER'];
//Return that value to the form
return esc_url_raw($refurl);
}'
The second form is linked to the image "Product Tour", and is simply designed to capture the Name, Company Name and Email address of the person who is taking the tour (clicks on the button and fills out the form). Nothing special with this form, very simple.
In looking thru the forum and documentation, it looks like I need to use tabindex for more than one form on a page, so I have added 'add_filter("gform_tabindex", create_function("", "return 1;"));' to the functions.php file, and also added '<?php
gravity_form_enqueue_scripts(3,4, true);
?>' in the header.php file. (Not sure of the syntax for allowing forms 3 & 4 ??)
I wish to display both forms in a Fancybox, so I have installed Easy FancyBox and added this code to my functions.php: 'add_filter ('wp_nav_menu_menu_items','add_producttour', 10, 2);
function add_producttour($items, $args) {
$items .= '<li class="my-contactus"><div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1"> <?php gravity_form(3, true, true, "", "", true, 4); ?> </div></div><img src="http://74.54.88.165/~rwatchi/wp-content/themes/BuilderChild-Default/images/ptnav.png" alt="Product Tour" />';
return $items;
}
add_filter ('wp_nav_menu_menu_items','add_contactus', 10, 2);
function add_contactus($items, $args) {
$items .= '<li class="my-contactus"><div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1"> <?php gravity_form(4, true, true, "", "", true, 1); ?> </div></div><img src="http://74.54.88.165/~rwatchi/wp-content/themes/BuilderChild-Default/images/emailnav.png" border="0">';
return $items;
}'
I had to change the single quotes in the GF parameters because it was giving an error. I've tried single quotes, double quotes and just a space without any luck. I do not know php very well.
I have used the FancyBox plugin on another site w/GForms with no problems, but as you can see when you go to the URL, it's not working and I've tried searching the forums and documentation....can you please help? Thanks so much.