0

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 get the success message, to get via email a unique number and then contact with the company for the rest procedures. I'm also using contact-form-7 plugin for the form. Any idea or any plugin that could do this automatically? Even if code is needed, let me know! Thanks in advance!

Christina Mayer
  • 1
  • 1
  • 1
  • 1
  • What's your goal? Do you want to check if they own the email address they filled in on your contact form? What do you want (them) to do after they provided the unique number? It might be best to let them create an account on your website, email verification is build into the registration process. – Koen de Bakker Nov 27 '13 at 15:33
  • well, the number has nothing to do with the website (after they will obtain it of course), it has to do with the company, like an ID that will let them send some papers (natural process). The registration form could be a solution, but they prefer something like I said before, a unique ID. – Christina Mayer Nov 27 '13 at 16:05
  • Did you try my answer Christina Mayer? – Koen de Bakker Dec 03 '13 at 08:01
  • We did in a different way, we asked from customers to have their tax code with them (which is a unique number), so there is no need anymore, because we were in a hurry. Thank you for your time anyway! – Christina Mayer Dec 18 '13 at 12:10

1 Answers1

3

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.

Koen de Bakker
  • 390
  • 1
  • 12
  • I've build limo reservation website and in that I've build form using contact form 7 and client also requires unique inquiry ticket function which will send unique id of each form submission. But mostly on submission the ticket string is same, e.g I've submit 3 mails and on all of it i got this string "Ticket # e89a55dc". – Umair Razzaq Aug 24 '15 at 15:04
  • Any suggestions for me about it? – Umair Razzaq Aug 24 '15 at 17:27
  • Hey guys any hint for me regarding this issue? – Umair Razzaq Aug 29 '15 at 11:47
  • @Koen de Bakker How to enumerate the numbers like "ICLAA 001, ICLAA 002,..." for each form submission? –  Jan 19 '17 at 20:18
  • @Koendebakker Your answer works fine.. Only think I wanted to do is instead of random numbers i wanted to generate the numbers in increasing order.. ofcourse for each form unique. –  Jan 19 '17 at 20:22