set_query_var doesn’t seem to work on init hook
set_query_var doesn’t seem to work on init hook
set_query_var doesn’t seem to work on init hook
Kind of – I would suggest using init. This would probably be the best way of doing it since you can process the form as described below. wp_head would work though. Also, you should make sure you are making necessary checks with ‘nonces’. I suggest the init hook as you can employ something similar to … Read more
The reason is that if you are on page 1, the data that is posted to be saved is an array of the form: XX_theme_settings=array(‘XX_Option1′ =>’input1′,’XX_Option2’=>’input2′,…) and contains no data from page 2. This is because the input from page 2 is not posted with it (since it wasn’t in the same <form> – it’s … Read more
the Dynamic Text plugin cannot make what you need, but I use this code to write a new tag that you can use like that : [dynamictext_placeholder enquiry-product placeholder “placeholder text” “CF7_GET key=’product-name'” “before ‘%s’ after”] for that, create a new plugin with that : add_action( ‘wpcf7_init’, function () { wpcf7_add_form_tag( array( ‘dynamictext_placeholder’) , ‘wpcf7dtx_dynamictext_placeholder_shortcode_handler’ … Read more
The following code creates a new role. In fact is simply clones the subscriber role, so if you are not using that role currently, you may as well just use that. The following function need only be run once (it run’s when a user is ‘admin side’) //Creates a custom role called ‘my_new_role’. //Run this … Read more
You are actually closer in your first attempt. My recommendation would be to create a folder called “scripts” in the WP root and put your PHP script files in here as well as your attachment(s). You will then need to declare the full path in your action attribute as the script does not now share … Read more
Ok not sure if this is the best method to use but it worked for me. I used a combition of jquery-ui-autocomplete – and the JSON API plugin First download the required js files from the link above. I used jqueri-ui from the Google library Install and activate JSON API plugin I then used the … Read more
The * appears under the field because the field is inside the label. There doesn’t appear to be any useful filters for this, but you could use one of the hooks to inject some JS on the page that adds the *: required = jQuery( “<span>*</span>” ); required.css(“color”, “red”); jQuery(‘label br’).before( required ); Note: if … Read more
Not sure how I ran into this question one year later, but since it is unanswered… Instead of self-submitting the form and then redirecting to Paypal, you can instead have the paypal url as your form’s action, but use Ajax to save the form data before the form is submitted to Paypal. You can also … Read more
In theory yes, but it will be a very bad thing to do. For that you will need to have the secret used to generate the nonce at site A in site B which means tht if site B is compromised site A might be as well (there is also some time synchronization that needs … Read more