How to post two values in an option field?

前端 未结 6 2139
野性不改
野性不改 2020-12-01 22:38

I\'d like to post two values in one drop down option and I\'m not sure about the best way to approach it.

The drop down list pulls data in from an external service.

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 23:28

    You could make as many hidden inputs as there are options, each with the name of one option value. The input's values are the contents of the options. In the second script, you can look for the dropdown value, and then take the value of the hidden input with that name.

提交回复
热议问题