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

How to add a checkbox with categories of entries to the form Contact Form 7 WordPress

I am not sure about subcategories that will expand only after clicking I have never seen any form fields that does this. However, you can use the dynamic_dropdonw field available in the Smart Grid-Layout Extension for CF7 plugin. It allows you to build a select2 droddown field using a category. Select2 js are quite cool … Read more

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 } }