Thanks but this plugin doesn't seem to do anything differentfrom
sfWidgetFormPropelJQueryAutocompleter,
am I right?
I already have an ajax autocompleter box created and working, what I want to
do
is to add a JS button near it which will put the searched element inside the
associated
list of my DoubleList select.
Perhaps the only solution is to tweak
the sfWidgetFormPropelJQueryAutocompleter renderer
and add a link which invokes the same JS function invoked
by sfWidgetFormSelectDoubleList.
so if my ajax input field is called ConceptSearch and my associated list is
called narrowerList in the renderer I'll put something like:
sprintf(' <a href="#" onclick="%s">%s</a>',
'sfDoubleList.move(\'ConceptSearch\', \'narrowerList\'); return false;',
'<img
src="'._compute_public_path("/images/icons/001_28.png",'images','png',true).'"
alt="associate" />').
and this get indeed created successfully, but the JS function doesn't work,
when I press the button it jumps on top of the page
and does nothing...
mumble mumble...
cheers.
2009/7/25 melchior <[email protected]>
>
> Perhaps this can help you
> http://www.symfony-project.org/plugins/psToolboxPlugin
>
>
> On 25 juil, 15:53, "Tommaso D'Argenio" <[email protected]> wrote:
> > I was able to setup the AutoComplete which returns the value I want but
> > still it is a single input fieldI need the result to go into the
> > DoubleSelect list which I get it to work on his own, now How to combine
> > the two things together? Is there a correct way to do it? Shall I create
> a
> > new JS function which somehow
> > move the searched item inside the associated list? Will it be saved?
> >
> > any insight is appreciated.
> >
> > thanks
> > cheers.
> >
> > 2009/7/25 Tommaso D'Argenio <[email protected]>
> >
> > > Hi,
> > > I read already that post, but it does explain how to use the single
> widget
> > > and not
> > > combine them or at least not as I want.
> >
> > > I need to have a many-to-many relationship select list and an
> autocomplete
> > > input field
> > > to make search in this select list. However even using the DoubleList
> > > widget I don't know
> > > how to load the associated array ... It is always empty because I can't
> see
> > > where/how to
> > > associate the widget with my data model and can't find a proper
> > > documentation either ..
> >
> > > Assume my data model is something like this
> >
> > > article:
> > > id: ~
> > > title: { type: VARCHAR, size: '255', required:
> true }
> > > description: { type: LONGVARCHAR, required: true }
> >
> > > related:
> > > id: ~
> > > article_id: { type: INTEGER, size: '11', required:
> > > true, foreignTable: article, foreignReference: id, index: true }
> > > related_id: { type: INTEGER, size: '11', required: true,
> > > foreignTable: article, foreignReference: id, index: true }
> >
> > > so each article can be related to any other one, this is a many-to-many
> > > relationship.
> > > Now in my admin section I want to have in the editing form of the
> article a
> > > Double Select list with the related article
> > > taken off the m-2-m relationship, and since the list of article is big
> I
> > > want to also have an autocomplete input field
> > > where I can search on the title and add this to the relation list.
> >
> > > How to do all this? Is that possible nobody has a similar need, as I
> can't
> > > find anything useful on the forums/groups/etc.. :(
> >
> > > cheers.
> >
> > > 2009/7/25 Eno <[email protected]>
> >
> > >> On Fri, 24 Jul 2009, Tommaso D'Argenio wrote:
> >
> > >> > yes I was talking about Auto-Complete... I've read the plugin blog
> post
> > >> to
> > >> > use
> > >> > the sfWidgetFormPropelJQueryAutocompleter but I want to integrate
> this
> > >> with
> > >> > the
> > >> > sfWidgetFormSelectDoubleList... or alternatively have this
> auto-complete
> > >> > input
> > >> > box and a simple SelectList which contains all the associated values
> and
> > >> > having
> > >> > something to put the one found in the ajax input box inside the
> list...
> >
> > >> > bit tricky to explain I hope you got it... I simply don't know how
> to
> > >> > implement it ...
> >
> > >> > any idea is appreciated :)
> >
> > >> Did you look at
> >
> > >>http://www.symfony-project.org/forms/1_2/en/A-Widgets#chapter_a_sub_a.
> ..
> >
> > >> --
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---