This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » symfony 1.3 and 1.4 » sfWidgetFormDoctrineChoice return value
sfWidgetFormDoctrineChoice return value [message #103094] Mon, 26 July 2010 16:22
greendude  is currently offline greendude
Messages: 1
Registered: June 2010
Junior Member
I'm using Symfony 1.4 with Doctrine.

In a generated doctrine module, I want to capture multiple choices (for image ids), which I'm prepared to store in a string type mysql field.
So for the attached field in Symfony, I have the following widget:

sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('whatever'), 'add_empty' => true, 'multiple' => true))

It looks exactly as I want, but unfortunately, it returns a value of "Array" back to the DB. I've tried searching for the insert point where I could look for and breakdown this array in setImages (the name of the field) in the base model, but I was unsuccessful.

Any guidance?

The larger picture btw, is that I have these "posts" to which I need to attach multiple images, which are a different model on their own.
I tried to do this initially using Doctrine's foreign keys, but this way, I could only attach posts to images, rather than images to posts. I couldn't figure out a way around that, so if someone has had similar experiences and has a solution, I would appreciate that as well.

Previous Topic:Pop-up boxes
Next Topic:Setting id_format has no effect
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software