I found a (very dirty) solution but for now it works:

I wrote a renderTextWidget:

class renderTextWidget extends sfWidgetForm {
  public function configure($options = array(), $attributes = array
())   {
        parent::configure($options, $attributes);
        $this->addOption('template', "");
  }

  public function render($name, $value = null, $attributes = array(),
$errors = array()) {
      return $this->getOption('template');
    }
  }
}

and use it in the configure function of the my object form that
contains the file-data:

public function configure() {
...
   $this->setWidget(.....
...

 if (!$this->isNew()) {
   $this->setWidget('delete, new renderTextWidget(array(
          'template' => $deletelink,
 )));


On 14 Jan., 18:19, Fabrizio <fabrizio.pucci...@gmail.com> wrote:
> This problem affects me too. Nobody can give some help / info?
> How to add delete link with embedRelation() ?
>
> On 13 Gen, 17:29, axel at <axel.zu...@gmail.com> wrote:
>
> > hi list,
>
> > I'm using embedForm() and embedRelation() (described 
> > in:http://www.symfony-project.org/advent_calendar/8/enhttp://www.symfony...
> > )
>
> > to handle upload of serveral files to objects of a certain class.
> > everything works fine as described in the example. I use the form
> > within an admin-generated view. my question: is there a easy way to
> > add for example: download, deletelinks for each embeded relation?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to