Return a unique number to the customer after apply on our form (wordpress)

后端 未结 1 876
执笔经年
执笔经年 2020-12-20 10:19

I\'m making a web site with Wordpress, in which there is a form that has to be filled by customers. I want for every customer that will apply, after complete the filling and

相关标签:
1条回答
  • 2020-12-20 10:59

    You could use the contact-form-7-dynamic-text-extension plugin.

    Install the plugin, add

        /* Generate Quote Ticket */
    function genTicketString() {
        return substr(md5(uniqid(mt_rand(), true)), 0, 8);
    }
    add_shortcode('quoteticket', 'genTicketString');
    

    to your functions.php and add

    Your Reference number: [dynamictext ticket "quoteticket"]
    

    to your form in contact form 7. (or make this field invisible through css)

    Lastly, add [ticket] to your e-mail body.

    Found this solution on http://wordpress.org/support/topic/contact-form-7-generating-reference-number and was written by AMCD.

    0 讨论(0)
提交回复
热议问题