How to pass value in POST, when you select a label in the widget ui Autocomplete?

Deal with the Ui Autocomplete widget. And until something can understand whether the standard methods of the widget to describe the functionality of a regular Selecta:
<select name="company_id">
 <option value="258">Some_company</option>

after sending I see $_POST['company_id']=258. This id I need for further processing.

In the terminology of the widget label = Some_company and value = 258. Can the user drop-down list to show a label when he will choose in the substituted value. But it is somehow not ice - I do not want to burden the user does not clear it by the numbers. The user should only see the label. But by default, if the entry is a label, then label and to server out.

Is such a powerful widget there is no way to do what you need and not make a fuss?
July 9th 19 at 10:15
1 answer
July 9th 19 at 10:17
not very clear what you are talking about, select and organized, which sends a value, and it shows what is inside the tag option.
The question is not clear to me. What widget are you using? A reference can be to understand what your problem is
talking about the jquery plugin that does autocomplete.

It uses input field or textarea. And it works a little differently than the standard select. So I want to see if we can get the plugin to work like a regular select. - brionna.Champl commented on July 9th 19 at 10:20
: the fact that it is designed a bit for other purposes)
You can first write raspers on the server, and second write-side UI rospars, collecting form data and sending via Ajax. - antonetta.Collins commented on July 9th 19 at 10:23
: for the same "other purposes"? Fill in the form to send to the server.... In fact, this plugin is an alternative version of selekt. More advanced. Only that model the functionality of the select is not implemented.
It is clear that I've so much to do to get my desired id. But it seemed that it should work by default. - brionna.Champl commented on July 9th 19 at 10:26
: duck you understand not.
Auto-completion != the selekt.
there are dropdown with autocomplete with all the bells and whistles selekta. And this plugin for other purposes.
In our project we use it to build a search filter that is transmitted to the server.

view select2 for jquery. We in the project use the library semantics, there is a whole lot of interesting and comfortable pieces.

in your example, probably will fit there in the examples, scroll down to the sample choice of state - antonetta.Collins commented on July 9th 19 at 10:29
OK, thanks, wait I will look. Maybe the truth is I just needed more. - brionna.Champl commented on July 9th 19 at 10:32
if all of a sudden will help - I'd be happy to tick the answer)
well, maybe with a question on semantics to dropdown will tell what, select2 itself is not used, but I heard good reviews - antonetta.Collins commented on July 9th 19 at 10:35
: there still used selects. I have too many titles to select, so I'd like to see a plain text field with the ability to autocomplete when entering data. But sending data to the server as select :)
So, keep looking for the right variant. There is one, but only works on ancient versions of jquery. So looking for a replacement.
In any case, thanks for the links. Will come in handy. - brionna.Champl commented on July 9th 19 at 10:38
: there is a connection possibility to select multiple values if you need it.

And I think faster to just rewrite the action submit'e, how long to look for something that may not, or you are looking for not in those words ) - antonetta.Collins commented on July 9th 19 at 10:41
: faster, Yes. in fact. Just was sure immediately found a ready solution for this type of situation. - brionna.Champl commented on July 9th 19 at 10:44

Find more questions by tags jQuery