• Resolved bgtbbox

    (@bgtbbox)


    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: 1ABZ250098

    I want a space, like this: 1 ABZ 250 089

    Can someone help me finish with good code?

    thank you very much

Viewing 1 replies (of 1 total)
  • Thread Starter bgtbbox

    (@bgtbbox)

    J’ai trouvé grace à une aide généreuse d’un développeur d’un plugin de contact form 7 dont je dispose

Viewing 1 replies (of 1 total)
  • The topic ‘MASK FIELD CF7’ is closed to new replies.