Tag Info

New answers tagged

0

You will have to use the Campaign Monitor Api: http://campaignmonitor.github.io/createsend-php/ Or if you only use it for newsletter sign up, you can use a plugin: https://wordpress.org/plugins/search.php?q=campaign+monitor


2

Your attempt to send your AJAX requests to wp-admin/admin-ajax.php is correct but it will be better to create a javascript global variable using wp_localize_script() to make any data available to your script in functions.php that you can normally only get from the server side of WordPress. For example, your javascript code can be in the same folder with ...


-1

You cannot use Ajax on Wordpress that way. There are many tutorial about using Ajax on wordpress. I think the simplest is http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/


0

Try add this code to your site's js $('form').unbind('submit').submit(); By DemoUser: http://stackoverflow.com/questions/9767871/jquery-submitting-a-form-twice


0

$j = jQuery.noConflict(); $j(document).ready(function() { $j('#myform').submit(submit_myform); }); function submit_myform() { if (!myform_is_valid()) { window.location.href = "#myform"; return false;//prevent normal browser submission, to display validation errors } else { $j.ajax({ url: 'saveform.php', ...


0

Do not use variable name "name" for html textbox control, use something else. This behavior is due to internal handling of WordPress with "name" variable found in query string of posted data.


0

You should use http://example.com/page-slug/ where page-slug is page created by make Query.php as template. <form action="http://example.com/page-slug/" enctype="multipart/form-data" method="post" name="contact">


0

The main problem is that, in your $_POST loop, $value is an array, yet you apply htmlspecialchars to it, which will vomit and return back nothing. If you haven't done so already, set WP_DEBUG to true in your wp-config.php - developing without it is simply not an option. Regardless, let's fix that dirty $_POST loop: $tax_query = array(); // Don't need ...


0

You can use sessions to store the data. There is a plugin also for that which I have used in the past and it works quite good. https://wordpress.org/plugins/wp-session-manager/


0

Assuming the images are posts. Register a new post meta for them and use the ID for your form in that post meta, this will allow you to relate to the form. https://codex.wordpress.org/Function_Reference/add_post_meta


0

Use get_category() to convert the ID into a category data object. $cid = get_user_meta($uid, 'user_location', true); $c = get_category($cid); echo $c->name;



Top 50 recent answers are included