The best way is to not use the input_auto_complete_tag helper but use
the generated input element + javascript. And then pass form values to
the action you are calling, something like this (i copy pasted it from
another project).


<input type="text" name="company_search" id="company_search" value=""
autocomplete="off" class="">

<div id="company_search_auto_complete" class="auto_complete"></div>
<script type="text/javascript">
//<![CDATA[
new Ajax.Autocompleter('company_search',
'company_search_auto_complete', '/company/autoComplete/select/a',
{afterUpdateElement:function (inputField, selectedItem) {
    new Ajax.Request('/translation/assignCompany/company_id\/' + $
('country').value, {asynchronous:true, evalScripts:false});

                                                                        }});
//]]>

You see i am passing $('country).value to the action i am calling

I don't know if it's the best approach, but it does work :)



On Sep 23, 7:11 pm, manghi <[EMAIL PROTECTED]> wrote:
> Is anybody there to help me out with this ??
>
> On Sep 23, 9:45 pm, manghi <[EMAIL PROTECTED]> wrote:
>
> > Obviously i am calling this function inside a form. This function only
> > posts the value of the form element in which the autocomplete is
> > configured, but I also need to know values of other form elements so
> > that I can create the selection list properly.
>
> > For example:
> > <?php echo select_country_tag('country', $country); ?>
> > <?php echo input_auto_complete_tag('state', 'state',
> > 'locality/autocompleteSubdivison1',                                         
> >                                         array('autocomplete'
> > => 'off'),                                                                  
> >                      array('use_style'    => true))
> > ?>
>
> > now when there is Ajax request, I also want the value for the country
> > to go to the server, so that I can make the selection options. Is
> > there any way ??
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to