Custom tag does not send generated input value in php
-
I generated a random number concatenated with the date of the day in a custom tag. This number must appear in the imput and be sent in the body of the email. This part of the number is working, but in the body of the email only the short code [prot] appears without the number. The code in the function. php is like this: add_action( 'wpcf7_init', 'custom_add_form_tag_prot' ); function custom_add_form_tag_prot() { wpcf7_add_form_tag( 'prot', 'custom_prot_form_tag_handler' ); // "prot" is the form-tag type } function custom_prot_form_tag_handler( $tag ) { $number = random_int(10000, 999999); $date = date('dmy'); $numData = "Number " . $number . "." . $date; //$protocol='<p>'.$numData.'</p>'; $protocol='<input class="wpcf7-form-control cws_width_50" style="color:blue" disabled="disabled" value="'.$numData.'">'; return $protocol; $_SESSION = $protocol; } Remembering that I already tried my_special_mail_tag without success. Could someone please have a solution? Thanks for the help.
The page I need help with: [log in to see the link]
- The topic ‘Custom tag does not send generated input value in php’ is closed to new replies.