Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Ajax Dropdown Select
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Julien Duthoit  
View profile  
 More options Aug 28 2012, 4:41 am
From: Julien Duthoit <dutho...@gmail.com>
Date: Tue, 28 Aug 2012 01:41:28 -0700 (PDT)
Local: Tues, Aug 28 2012 4:41 am
Subject: Ajax Dropdown Select

I need to fulfill a field in a entity by displaying dropdown select fields.
By choosing an option on a first select, It must display a second select
with options relative to this first choice. An so on for one or two select
more.

Do you have any ways or useful documentation to accomplish that?  

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
wd@aloah-from-hell.de  
View profile  
 More options Aug 28 2012, 4:43 am
From: "w...@aloah-from-hell.de" <w...@aloah-from-hell.de>
Date: Tue, 28 Aug 2012 10:43:44 +0200
Local: Tues, Aug 28 2012 4:43 am
Subject: Re: [Symfony2] Ajax Dropdown Select
Hi,

> Do you have any ways or useful documentation to accomplish that?

Try the ShtumiUsefulBundle and dependent_filtered_entity :)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Duthoit  
View profile  
 More options Aug 28 2012, 4:48 am
From: Julien Duthoit <dutho...@gmail.com>
Date: Tue, 28 Aug 2012 01:48:30 -0700 (PDT)
Local: Tues, Aug 28 2012 4:48 am
Subject: Re: [Symfony2] Ajax Dropdown Select

If there is a bundle for that, it's perfect.
I'll check that and keep this thread posted.

Thanks

Le mardi 28 août 2012 10:43:50 UTC+2, wayne a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Duthoit  
View profile  
 More options Aug 28 2012, 5:28 am
From: Julien Duthoit <dutho...@gmail.com>
Date: Tue, 28 Aug 2012 02:28:47 -0700 (PDT)
Local: Tues, Aug 28 2012 5:28 am
Subject: Re: [Symfony2] Ajax Dropdown Select

Sadly, that's not really what I need. The ShtumiUsefulBundle and
dependent_filtered_entity works with fields depending of two different
entities.
I need to work with one field on a unique entity.
To be more descriptive, I've got a field in an entity which is a foreign
key to another entity.
This another entity as code beginning as A,B, etc. But goes further like
A1,A2, etc.

What I need is to display the first level choice in a select, and after
this choice has been made, to display a second select with relatives
further choices.
I hope I have succeed to explain it in a comprehensible way.

Thanks

Le mardi 28 août 2012 10:48:30 UTC+2, Julien Duthoit a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leonardo  
View profile  
 More options Aug 28 2012, 6:38 am
From: leonardo <leonardo.proie...@gmail.com>
Date: Tue, 28 Aug 2012 03:38:59 -0700 (PDT)
Local: Tues, Aug 28 2012 6:38 am
Subject: Re: [Symfony2] Ajax Dropdown Select

I'm not sure that I understand the question and I never used
ShtumiUsefulBundle but reading the documentation:

parent_property - property that contains master entity with ManyToOne
relationship

So I think you can use a "One-To-Many, Self-referencing"
http://doctrine-orm.readthedocs.org/en/2.0.x/reference/association-ma...

ciao
Leonardo

Il giorno martedì 28 agosto 2012 11:28:47 UTC+2, Julien Duthoit ha scritto:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Duthoit  
View profile  
 More options Aug 28 2012, 10:22 am
From: Julien Duthoit <dutho...@gmail.com>
Date: Tue, 28 Aug 2012 07:22:41 -0700 (PDT)
Local: Tues, Aug 28 2012 10:22 am
Subject: Re: [Symfony2] Ajax Dropdown Select

I didn't know this Doctrine feature, maybe it can work with that. It
doesn't work with my entity structure for the moment so I'll have to modify
it before.

Thanks!

Le mardi 28 août 2012 12:38:59 UTC+2, leonardo a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Duthoit  
View profile  
 More options Aug 29 2012, 4:25 am
From: Julien Duthoit <dutho...@gmail.com>
Date: Wed, 29 Aug 2012 01:25:13 -0700 (PDT)
Local: Wed, Aug 29 2012 4:25 am
Subject: Re: [Symfony2] Ajax Dropdown Select

I've tried with your advice of a self-referenced entity, but it seems not
to work like that. Maybe I'm wrong?
I join you my base table (I hope it's enough readable) and my entity
definition :
http://pastebin.com/5GYvhB5p

Maybe someone will see what's wrong.
Thanks for your help

Le mardi 28 août 2012 16:22:41 UTC+2, Julien Duthoit a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gregor de Lijzer  
View profile  
 More options Aug 29 2012, 5:24 am
From: Gregor de Lijzer <g.de.lij...@gmail.com>
Date: Wed, 29 Aug 2012 02:24:27 -0700 (PDT)
Local: Wed, Aug 29 2012 5:24 am
Subject: Re: [Symfony2] Ajax Dropdown Select

Hello!
For AJAX purposes i use the YUI from Yahoo. However.
Why don't you call an url after an onselect event like
http://my.com/getsecondList?choice1=A that returns JSON or XML and fill
your second choice list with this result?

*you need an entry in your routing.yml like *
_getsecondList:
    pattern:   /getSecondList/{firstChoice}
    defaults:  { _controller: ExampleBundle:Default:getSecondList}
*you need a controller (DefaultController for example):*
class DefaultController extends Controller
{
    public function getSecondListAction($firstChoice)
    {
      if ($firstChoice== blala){
        $secondChoice= get second choice content

    return $this->render('ExampleBundle:Default:secondChoice.xml.twig', array('secondChoice' => $secondChoice));

      }
    }

}

*a twig-xml file like e.g. secondChoice.xml.twig*
<?xml version="1.0"?>
{% for c in secondChoice %}
  <Choice>
    <item>{{ c }}</item>
   </Choice>
{% endfor %}

just as an idea :-)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julien Duthoit  
View profile  
 More options Aug 31 2012, 6:26 am
From: Julien Duthoit <dutho...@gmail.com>
Date: Fri, 31 Aug 2012 03:26:28 -0700 (PDT)
Local: Fri, Aug 31 2012 6:26 am
Subject: Re: Ajax Dropdown Select

Thanks for your advices. With this solution, it's no more less than a
Javascript problem now... Sadly, I'm not very good with it for the moment
but it's a reason to learn more.

Le mardi 28 août 2012 10:41:28 UTC+2, Julien Duthoit a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »