Sorry for the question but, I don't know how to solve my problem.
I've got a form with predefined input names in a standard form and I have other inputs with any random names, for example:
<form action="">
<!-- required inputs -->
<input type="text" name="name" value="Ian" />
<input type="text" name="surname" value="Dope" />
<input type="tel" name="phone" value="782910456" />
<input type="tel" name="comment" value="" />
<!-- optional inputs -->
<input type="hidden" name="conact_amount" value="1" />
<input type="hidden" name="value1" value="2" />
<input type="hidden" name="other_filed" value="3" />
<input type="hidden" name="different_name" value="4" />
</form>
In the above form, the required inputs will have the same name, whereas the optional inputs can be any arrangements of different names.
I want to leave the required fields as they are, but the optional fields - that I don't know the names of - need to be placed in an array called comment
.