Set service price in select

Asked

Viewed 41 times

0

I have a question, I have a table of requests id,name,request,value,date... and on my page I have a form with select, I would like that when I select an option it sends to db the name of the order that is in the options of this select and each option has a value(R$) which in case would go to the value column, there would be some way to do in a tree of if for each value?

  • You need to explain more about your problem, this kind of confusing, could you post part of the code you are making? And which bank are you using? This option needs to be filled out based on database data?

  • What you’ve been trying to do?

1 answer

1

Each html element can only send a single value to your target, to do what you want, there are a few ways:

  1. Use other inputs in the page (Hidden or even text) and these receive values by javascript with the information related to each select.
  2. Use a value in each compound option, that is, the value, the name, each field you want to send, with some sort of separation Ex: (R$1,00)(my request)(...) and then separate at the other end.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.