From contact form to paypal

Maybe not the best coding wise answers, but for quick solutions that I’ve done and are common: Put the registration page as a thank you from PayPal, which is a setting when doing a PayPal payment button. Put the link to payment in the registration email that’s sent to them, from there they have to … Read more

Submit button returns to index page instead of sending data

Put var_dump($_SERVER[‘PHP_SELF’]); at the top of header.php and you will see the problem. That always points to index.php because nearly everything loads through index.php. Use get_permalink to get the “apparent” URL and use that instead of $_SERVER[‘PHP_SELF’] in the form action attribute.

Reset form on onclick function

If you want to have a reset button you have to include a reset input in the form: <input type=”reset” value=”Reset!”> This element resets all form values to default values. In your example <input type=”button” onclick=”” value=”Neka bud”> – <input type=”submit” value=”Godkänn bud” /> <input type=”reset” value=”Reset!”> </form>

Auto populate a Form

add_filter( ‘comment_form_defaults’, ‘bootstrap3_comment_form’ ); function bootstrap3_comment_form( $args ) { $args[‘comment_field’] = ‘<div class=”form-group comment-form-comment”> <textarea class=”form-control” id=”comment” name=”comment” cols=”45″ rows=”8″ aria-required=”true” placeholder=”‘ . __( ‘Comment’, “beautiful” ) . ‘”></textarea> </div>’; return $args; } fetch your content and put it inside textarea tag. you should add this function to your functions.php it’s better to change name … Read more

Create register form plus send post

UPDATE: Call forms into front-end: <?php if (!is_user_logged_in()) { get_template_part(‘header’, ‘form’); } else { get_template_part(‘header’, ‘panel’); } ?> header-form.php content: <div class=”alert alert-dismissible fade in” role=”alert”> <button type=”button” class=”close” data-dismiss=”alert” aria-label=”Close” data-toggle=”tooltip” data-placement=”top” title=”Close”><span aria-hidden=”true”>&times;</span></button> <div role=”tabpanel”> <!– Nav tabs –> <ul class=”nav nav-tabs” role=”tablist”> <li role=”presentation” class=”active”><a href=”#login” aria-controls=”home” role=”tab” data-toggle=”tab”><i class=”glyphicon glyphicon-log-in”></i> Login</a></li> … Read more

Calling custom PHP from a HTML form post action gives 404 error

Add unique field in your form. Eg: <input type=”hidden” name=”wdm_action” value=”1″> Put your ‘customer-details.php’ file code in below function:- add_action(‘template_redirect’,’wdm_customer_details’){ //check if that field present in the form, if yes then perform the action if(isset($_POST[‘wdm_action’] && $_POST[‘wdm_action’] != ”){ //customer-details.php file code } }

How to add contact form instead of checkout

Checkout Deletion I guess you are using Woocommerce even though you did not mention it. I didn’t understand why you want to delete the checkout page, but to do so, just go to Pages under the WordPress admin dashboard, and delete the checkout page. Contact Form Installation To add a contact form to your WordPress … Read more