That's a tough case for sure. I'm the plugin developer although the jQuery integration wasn't provided by me.

What exactly is not working? I know that we have problems when trying to embed forms that contain select boxes.

What error is thrown? You'd have to give me more information. Thing is, I'm in the middle of my diploma thesis so there is probably not much I can do for you now.

Cheers, Daniel

Sent from my iPhone

On May 12, 2010, at 11:20 AM, Luc Didry <lucsky2...@gmail.com> wrote:

Hello,

I'm using the ahDoctrineEasyEmbeddedRelationsPlugin to embed and clone
forms but there is a problem with some fields : if there is a
"<script>blabla</script>" element, this element is not cloned and the
javascript event obviously doesn't work.

These problematic fields are using the
sfWidgetFormDoctrineJQueryAutocompleter provided by sfFormExtraPlugin
to be displayed as text fields with ajax autocompletion instead of
combo boxes.

I'm using jquery-1.4.2 so the clone() method in
ahDoctrineEasyEmbeddedRelationsPlugin.jQuery.js should work but no.

For example, I have projects which can have one or many contacts.

Here's an excerpt of my /lib/form/doctrine/ProjetForm.class.php :

class ProjetForm extends BaseProjetForm
{
 public function configure()
 {
   $this->embedRelations(array(
     'Contacts' => array(
       'considerNewFormEmptyFields'    => array('personne_id'),
       'noNewForm'                               => false,
       'newFormLabel'                           => 'Nouveau contact',
       'newFormClass'                           => 'ContactForm',
       'newFormClassArgs'                    => array(array('sf_user'
=> $this->getOption('sf_user'))),
       'displayEmptyRelations'               => false,
       'formClass'                                  => 'ContactForm',
       'formClassArgs'                           =>
array(array('ah_add_delete_checkbox' => false)),
       'newFormAfterExistingRelations'   => true,
       'formFormatter'                            => null,
       'multipleNewForms'                     => true,
       'newFormsInitialCount'                 => 1,
       'newFormsContainerForm'            => null, // pass BaseForm
object here or we will create ahNewRelationsContainerForm
       'newRelationButtonLabel'             => '+',
       'newRelationAddByCloning'          => false, // I tried with
true and false, no difference
       'newRelationUseJSFramework'     => 'jQuery'
     ),
   ));
 }
}

Here's an excerpt of my /lib/form/doctrine/ContactForm.class.php :

class ContactForm extends BaseContactForm
{
 public function configure()
 {
   $this->widgetSchema['projet_id']->setOption('renderer_class',
'sfWidgetFormJQueryAutocompleter');
$this->widgetSchema['projet_id']->setOption('renderer_options', array(
     'value_callback' => array($this, 'getNomProjetClient'),
'url' => sfContext::getInstance()->getController()->genUrl ('projet/ajax'),
   ));
 }
}

Is there somebody which could help me, please ?

Thanks.

Luc Didry

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@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

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@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