This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfFormExtraPlugin's autocompleter does not work

Forum to discuss ExtJS and other JS plugins

sfFormExtraPlugin's autocompleter does not work

by Sejanus » Thu Feb 25, 2010 6:33 pm

Hello,
I'm trying to customize default doctrine generated form with some fancy Ajax stuff and it doesn't work.

I have installed sfFormExtraPlugin and I also have jQuery and jQuery UI installed (or so I think...).

The auto-generated code causing error:


Code: Select all
jQuery(document).ready(function() {
    jQuery("#field_id" ;)
    .autocomplete('/frontend_dev.php/module/ajax', jQuery.extend({}, {
      dataType: 'json',
      parse:    function(data) {
        var parsed = [];
        for (key in data) {
          parsed[parsed.length] = { data: [ data[key], key ], value: data[key], result: data[key] };
        }
        return parsed;
      }
    }, { }))
    .result(function(event, data) { jQuery("#field_id" ;).val(data[1]); });
  });


And the error message:

Error: jQuery("#autocomplete_table1_table2" ;).autocomplete("http://myurl/frontend_dev.php/model/ajax", jQuery.extend({}, {dataType: "json", parse: function (data) {var parsed = [];for (key in data) {parsed[parsed.length] = {data: [data[key], key], value: data[key], result: data[key]};}return parsed;}}, {})).result is not a function Source File: http://myurl/frontend_dev.php/model/action Line: 104

thanks in advance for your help ;)~ ;-)~ :wink: I'm really stuck...
Sejanus
Junior Member
 
Posts: 3
Joined: Thu Feb 25, 2010 6:04 pm