Skip to content
Advertisement

How to combine a input and a hidden value in a form?

I would like to know if there is a way to add a (hidden) value to a input value in a form.

For example, I would like to have a number input like so :

<input type="number" name='questionA' hidden_added_to_the_input_value="+test"> (the code doesn’t work), the user enters ’32’, and the final value $_POST[‘questionA] = ’32+test’

I think i will have to use js to do that, any help appreciate thanks 🙂

Advertisement

Answer

You mean this?

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement