• Resolved wpfan1000

    (@wpfan1000)


    Hi,

    I need to have some hidden fields in a form in order to pass on info to the destination page once the form is submitted.

    I need to set the value of each hidden field programmatically: the value of the field is based on a variable.

    Eg:

    
    echo '<input type="hidden" name="bestprice" value="'.$bestprice.'">';

    I found:
    https://wpforms.com/wpforms-hidden-field/

    But it does not seem to discuss how to set a hidden field programmatically, eg set the value based on a variable.

    Is this possible?

    If so, how?

    Thanks ahead of time……

    • This topic was modified 5 years, 5 months ago by wpfan1000.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add hidden fields to a form programatically’ is closed to new replies.