I have a module generated by the admin generator to manage customer
testimony related to a product ... so in my schema I have :

  testimony:
    id:
      type: INTEGER
      required: true
      autoIncrement: true
      primaryKey: true
    product_id:
      type: INTEGER
      required: true
      foreignTable: product
      foreignReference: id
...
...


so in the corresponding sfForm I have the following widget :

'product_id'    => new sfWidgetFormPropelChoice(array('model' => 'Product',
'add_empty' => false)),

So I choose the product with a select list ... so far so good ...

BUT ... I have many products so it's not practical to associate a product to
a testimony like this ...
On the other hand, my products are under categorie/sub-categorie so what I
want to do is to chose a product with cascading select box (other something
else) so I can choose the category, then the sub-category and then the
product ... but I don't know how to implement this in the admin generator
... create a new widget ? with embrded forms ?

Any ideas, suggestions, code sample , ... ?

Thanks :)

Le 28 janvier 2009 10:45, Lupu Alexandru-Emil <[email protected]> a écrit
:

> HI!
> English please!
> Alecs
>
> 2009/1/28 Olivier Revollat <[email protected]>
>
>> Bonjour,
>>
>> j'ai un module développé avec l'admin generator qui liste des témoignages
>> clients relatifs à des produits.
>> Dans l'admin, pour ajouter un de ces témoignages je dois donc lui associer
>> un produit ... seulement la liste des produits généré via le widget suivant
>> est longue :
>>
>> 'product_id'    => new sfWidgetFormPropelChoice(array('model' =>
>> 'Product', 'add_empty' => false)),
>>
>> Or les produits sont classés par famille / sous-famille (un produit
>> appartient a un unique couple famille/sous-famille)
>>
>> L'idée serait donc d'avoir trois liste de selection : on choisit la
>> famille (ce qui rafraichit la liste des sous familles) ensuite on choisit la
>> sous famille (ce qui liste les produits disponibles dans cete sous-famille)
>> ...
>>
>> Mais je ne sais pas trop par ou commencer pour avoir ce comportement via
>> l'admin generator (embedded form ? Avec Ajax ? comment faire pour les
>> valiators ?)
>>
>>
>> Si vous avez des suggestions, bout de codes, exemples concrets , ...
>> j'éspère avoir été assez clair ...
>>
>> Merci à vous tous !! :)
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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