jQWidgets Forums
jQuery UI Widgets › Forums › Editors › Input, Password Input, TextArea, ColorPicker, Rating, TagCloud, Loader › jqxInput autocomplete value not returned
Tagged: AutoComplete, jqxinput
This topic contains 4 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 8 months ago.
-
Author
-
hello,
I followed the example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxinput/index.htm?%28arctic%29#demos/jqxinput/remoteautocomplete.htm
Everything works except I can not send the Value retrouné because it is empty at the Post Form.
Is there anything to add to make it work?
// Autocomplete Ville var timer; $("#IDVille").jqxInput({ placeHolder: "IDVille", height: 25, width: 200, source: function (query, response) { var dataAdapter = new $.jqx.dataAdapter ( { datatype: "json", datafields: [ { name: 'IDVille' }, { name: 'CP' }, { name: 'Ville' } ], url: "../data_json.php?DataType=ListeVille", data: { featureClass: "P", style: "full", maxRows: 12, username: "jqwidgets" } }, { autoBind: true, formatData: function (data) { data.name_startsWith = query; return data; }, loadComplete: function (data) { if (data.length > 0) { response($.map(data, function (item) { return { label: item.IDVille + ", " + item.CP + ", " + item.Ville, value: item.IDVille } })); } } } ); } });
Hi Cwi,
Where do you want to return the value and what value you mean? The jqxInput in the provided code has only Text. It does not have Value.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comIn a traditional working on the select: Value (key)
example:
<select name=”test”>
<option value=”Key1″>item1</option>
<option value=”Key2″>tiem2</option>
</select>So I need simpement can recover the value to save …
But in this example, and empty Value, not sent to the post.
If I select eg Item2 I should get the choice to save Key2
A made in the jqxInput not reference its contents logic.
it must be done that I use in jqxComboBox autocomplete (ajax) option to load the list after the seizure.
Is it possible to charge a jqxComboBox in autocomplete after the seizure of the first letter?
Hi Cwi,
If you want to make the jqxInput to work with label/value pairs, please look at this sample: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxinput/bindingtojson.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.