Following is the code:
<form method=”POST” action=”https://www.example.com/checkout”>
<div class=”form-group”>
<label for=”amt”>Amount</label>
<input type=”number” class=”form-control” name=”amt_pay” id=”amt” placeholder=”Amount”>
</div>
<!– Button trigger modal –>
<button type=”button” class=”btn btn-default” data-toggle=”modal” data-target=”#myModal”>Make Payment</button>
<!– Modal –>
<div class=”modal fade” id=”myModal” tabindex=”-1″ role=”dialog” aria-labelledby=”myModalLabel”>
<div class=”modal-dialog” role=”document”>
<div class=”modal-content”>
<div class=”modal-header”>
<button type=”button” class=”close” data-dismiss=”modal” aria-label=”Close”><span aria-hidden=”true”>×</span></button>
<h4 class=”modal-title” id=”myModalLabel”>Login</h4>
</div>
<div class=”modal-body”>
<form class=”form-horizontal” name=”loginform” id=”loginform” action=”<?php echo esc_url( site_url( ‘wp-login.php’, ‘login_post’ ) ); ?>” method=”post”>
Email
<input type=”email” class=”form-control” id=”user_login” name=”log” placeholder=”Email ID” value=”” size=”20″>
Password
<input type=”password” class=”form-control” id=”user_pass” name=”pwd” placeholder=”Password” value=”” size=”20″>
<input type=”checkbox” id=”rememberme” name=”rememberme” value=”forever”> Remember me
<button type=”submit” class=”btn btn-warning” id=”wp-submit” name=”wp-submit” value=”Log In”>Login</button>
<input type=”hidden” name=”redirect_to” value=”<?php echo home_url(); ?>/checkout” />
<input type=”hidden” name=”testcookie” value=”1″ />
</form>
</div>
</div>
</div>
</div>
</form>
Checkout Page contains following code:
<?php echo $_POST[‘amt_pay’]; ?>
If I keep a simple submit button instead of Modal for Login on Product Page. The code works fine. If user clicks submit button the form value gets display on Checkout Page.
But I want a login system in between. Hence I added a login form in Modal on Product Page.
The problem is that the user gets login easily and gets redirected to Checkout Page from this form but the form value doesn’t passes to the Checkout page. It remains blank.
I googled but remain with no luck.
Plz provide me the code to pass form variables to checkout page after login.
Thanks
]]>[contact-form-7 id=”338″ title=”Project Enquiry Form”]
And what I need is that each form submits to a different sender (as well as cc me) relevant to the project.
Is there no easy way to do this? In the above shortcode for example where it says title=”Project Enquiry Form”, am I not able to use the title value somewhere in the form?
Anyway …
I’ve installed Contact Form 7 Dynamic Text Extension but I’m not sure I understand it right as to how I pass page values down into the contact form. I’ve tried with CF7_get_custom_field so I’ve added this into the Project Enquiry Form:
[dynamichidden dynamichidden-244 “CF7_get_custom_field project_email=’project_email'”]
now I thought that maybe I could pass the value down via the contact form 7 shortcode, in the same way that I explained with respect to the ‘title’ value, like this:
[contact-form-7 id=”338″ title=”Project Enquiry Form” project_email=”[email protected]”]
I guess that this is the simplest way to just pass the paramater straight down into the contact form via the contact-form-7 shortcode, but this doesn’t seem to work and I’m not really sure how you’re meant to do it. Can anyone help me understand better how I can achieve this?
Many thanks in advance,
M
Im trying to pass a parameter via URL (e.g. /page?myvar=123) and use it on any subsequent page, e.g. three pages later.
I followed advice here, but it doesn’t seem to be working: https://www.webopius.com/content/137/using-custom-url-parameters-in-wordpress
I have the plugin installed containing this code:
<?php
/* Plugin Name: Parameter
Plugin URI: https://webopius.com/
Description: A plugin to allow parameters to be passed in the URL and recognized by WordPress
Author: Adam Boyse and Pete Indelicato
Version: 1.1
Author URI: https://www.webopius.com/
*/
add_filter('query_vars', 'parameter_queryvars' );
function parameter_queryvars( $qvars )
{
$qvars[] = ' myvar';
return $qvars;
}
?>
I have a button on PAGE A that navigates to : /pete-test-pmp-plan-picker?myvar=25
And on the page I want to retrieve the variable, I have this (using an insert php plugin):
[insert_php]
echo hello;
global $wp_query;
if (isset($wp_query->query_vars['myvar']))
{
print $wp_query->query_vars['myvar'];
}
[/insert_php]
On that page I see the “hello” but I don’t see anything about “myvar”.
Please help?!
]]>2. permanent plugin pages – when installing the plugin i create my main page lets call it dashboard, and all my other pages with dashboard as the parent.
so my links will be dashboard/tickets but how can i keep it if the client change the page name ? i need to link those pages and i cant find a way to do it dynamically.
The form action is redirect to a custom page template where the custom wp_query running. The search form is using get method to passing the variable.
<form method="get" id="customsearch" action="<?php echo get_page_link( 3180 ); ?>">
//form input here.
</form>
Somehow, the form was not redirected to the desired page, instead it went to homepage, when the permalink structure set to default.
If I set the permalink other structure, like Numeric or Post name, it goes to the correct page, but url broken in paginated page. Eg:
First page:
www.example.com/search-page/?stringtosearch=xxxx?formsubmit=submit
to
www.example.com/search-page/page/2/?formsubmit=submit
(the GET data stripped)
Any idea why this happened?
]]>I have a plugin that pulls schools and shows them here via shortcode on a page:
https://www.phlebotomyedu.com/school-listings/
And if you click one of the schools it goes to here which is a page with the shortcode to show the for to get more information:
https://www.phlebotomyedu.com/schools/?tag=204355737&VKEY=10130&BLUID=20120618103014018393151
Only thing is it is showing a page not found?
If you go there directly it is working:
https://www.phlebotomyedu.com/schools/
It should be showing this because no variables was passed:
Our apologies!
Our site is currently undergoing scheduled maintenance and will be available soon.
Please bookmark this page and come visit us again.
Thank you for your patience!
Any help to why it isn’t working would be greatly appreciated!
]]>The tabs aspect works, it passing the right variable to the jquery.
How do I pass that variable to the content area so that the correct info is displayed?
Here’s my code:
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
Thanks. The Tabs are working. If I put separate queries for each tab, then I am successful.
Her forum reply is here.
The .htaccess rule looks like this:
RewriteCond %{QUERY_STRING} (.+?)&name=(.+)
RewriteRule ^page-name/ /page-name/?%1&fullname=%2 [R,NC,L]
And I’ve made sure I put it between
RewriteEngine On
and
RewriteBase /
But I think it may not be working because my page is a sub-page and so when I do this:
RewriteRule ^gifts/thanks/ /gifts/thanks/?%1&fullname=%2 [R,NC,L]
I have a feeling those forward slashes aren’t right. I’ve tried various combinations, but it’s not working. Or is there some other issue I’m not seeing?
]]>