• Hi,

    I’ve stumbled upon a rather unique issue.

    In my theme’s header.php, I have the following code.
    $ConvCheckboxRandomNo = rand(10000,90000);

    I need to call this variable in my contact form.
    Something like this:
    <input type=”hidden” name=”MyName” value=”$ConvCheckboxRandomNo”>
    AND in Javascript
    <script>alert(‘$ConvCheckboxRandomNo’);</script>”;

    Can you tell me how this can be done. I tried adding it simply and expectedly it did not work. What is the correct way to do this?

    Thanks!

The topic ‘Call PHP variable in CF7’ is closed to new replies.