MASK FIELD CF7
-
MASK FIELD
Hi, I’m French, sorry for bad English.
I use the form 7 contact plugin and the “Contact form 7 dynamic text” plugin to generate a number and letters randomly, for the contact form 7 form.
I managed to enter the code in function.php to generate random code which is:
/* Generate Quote Ticket */
function genTicketString() {$length = 10;
$characters = “0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ”;
for ($p = 0; $p < $length; $p++) {
$string .= $characters[mt_rand(0, strlen($characters)-1)];
}
return $string;
}
add_shortcode(‘quoteticket’, ‘genTicketString’);
The code is paste. EX: 1ABZ250098I want a space, like this: 1 ABZ 250 089
Can someone help me finish with good code?
thank you very much
- The topic ‘MASK FIELD CF7’ is closed to new replies.