Is it possible to create a form in pure HTML so that when it is passed, the result is the array, but the 'name' becomes the index 'key' and the value becomes the index 'value'?
For instance, say my form is to have multiple attributes. First attribute is a color, second is a abbv, and third is a cost.
So I'd like to get an array of the following form:
attributes: [
{
key : 'color',
value: 'the color the user picks'
},
{
key : 'abbv',
value: 'the abbreviation the user types'
},
{
key : 'cost',
value: 'the cost the user assigns'
}
]
I want to know if this is possible in pure HTML. I know I can perform this in Javascript.