emposha / FCBKcomplete

Jquery facebook like(fancy) multi-select
http://www.emposha.com
383 stars 115 forks source link

Need a value to pass thru #28

Closed aliusdesigns closed 13 years ago

aliusdesigns commented 13 years ago

I used this autocomplete - works perfect, one thing though, it doesn't pass the value through. I've written "submit.php" that it $_REQUEST["select2"] from the form before, and then it runs it through a switch cases and redirects according to the value that's "passed on" but nothing happens.

I.E. What I'm trying to accomplish is let's say first caption is

{"caption":"Apples (Green)","value":6781},

So that when user types in apples, it autcompletes, then when user clicks "Send" it sends data to "submit.php" and then depending on what value passed on, it redirects to another site depending on the case. Right now, nothing happens. Doesn't redirect anywhere.

Whats the point of those "value" in data.txt? How would I assign a value to the "caption" that fills into the text field in a form?

bmontgomery commented 13 years ago

it looks like what comes across is an array, throw

<?php echo $_REQUEST['select2'] ?>

in your page to see - it prints out "Array". You could use $_REQUEST['select2'][0] and that should give you the value you're looking for. Let me know how it goes.