show image in mail contact form 7 [closed]

As per my comments, it seems you are trying to attach images to emails rather than ‘show’ them. Since you have [file* image filetypes:jpg|png|gif] what you need to do is put [image] in the ‘File Attachments’ box in the Contact Form 7 settings. This is from the Contact Form 7 File Uploading and Attachment doc.

How to submit data from HTML form?

I agree with other answers that most of the time it is better to use a plugin to handle form submissions. However, there are exceptions to this rule. If you find yourself in a situation where you need to handle the form submissions yourself, you can submit data to admin-post.php. Here is how to set … Read more

Creating a contact form without a plugin [closed]

This is my very simple implementation of contact form: class WPSE_299521_Form { /** * Class constructor */ public function __construct() { $this->define_hooks(); } public function controller() { if( isset( $_POST[‘submit’] ) ) { // Submit button $full_name = filter_input( INPUT_POST, ‘full_name’, FILTER_SANITIZE_STRING ); $email = filter_input( INPUT_POST, ’email’, FILTER_SANITIZE_STRING | FILTER_SANITIZE_EMAIL ); $color = filter_input( … Read more

User registration problem in WordPress

Look at the code in wp-login.php (line 481 and following). There you can see how registration works. The names of your form – email, name – are probably overwritten by WordPress. Always use prefixed names in forms to avoid collisions, eg.: ma_email and ma_name. Prepare incoming data. Do not just write anything someone sends you … Read more

Best way to create multi-step form with data saved to user account for later updating?

If you are working on a custom theme, I believe it is easier to be done with a page template and WordPress’s wp_ajax function. The form can be included in the page using <?php get_template_part(‘form’,’0f-50-question’) ?>. Here is the pseudo code for the form <form id=”quite-a-long-form” action=”<?php echo admin_url(‘admin-ajax.php’); ?>” method=”post” class=”form” > $step = … Read more

using update_user_meta in form to set and get custom meta

You need to pull your meta_data from WP and fill that info into the form… like so: function my_form_function() { global $current_user; $low_price = get_user_meta( $current_user->ID, ‘_low_price’, true); $medium_price = get_user_meta( $current_user->ID, ‘_medium_price’, true); $high_price = get_user_meta( $current_user->ID, ‘_high_price’, true); ?> <form name=”setPrices” action=”” method=”POST”> <fieldset> <label for=”lowPrice”>Value 3:</label> <input type=”text” id=”lowPrice” name=”lowPrice” value=”<?php echo … Read more

How to get current url in contact form 7

See this example on how to create and parse the shortcode in the contact form 7 to use it add [current_url] add_action( ‘wpcf7_init’, ‘wpcf7_add_form_tag_current_url’ ); function wpcf7_add_form_tag_current_url() { // Add shortcode for the form [current_url] wpcf7_add_form_tag( ‘current_url’, ‘wpcf7_current_url_form_tag_handler’, array( ‘name-attr’ => true ) ); } // Parse the shortcode in the frontend function wpcf7_current_url_form_tag_handler( $tag … Read more