farinspace / wpalchemy

Thin framework for wordpress
http://wpalchemy.com/
Other
416 stars 110 forks source link

Repeat Field Not Working #85

Closed aliciacatalina closed 8 years ago

aliciacatalina commented 10 years ago

I am deploying my Wordpress site to a Google App Engine, and the repeat field stopped working. I have this on my meta-page.php <?php global $wpalchemy_media_access; ?>

have_fields_and_multi('docs')): ?> the_group_open(); ?>

the_field('datos'); ?> the_field('url'); ?> setGroupName('media-n1'.$mb->get_the_index())->setInsertButtonLabel('Insertar')->setTab('type'); ?> getField(array('name'=>$mb->get_the_name(),'value'=>$mb->get_the_value(),'readonly'=>'readonly')); ?> getButton(array('label'=>'Adjuntar un archivo')); ?>

Eliminar campos

the_group_close(); ?>
```

Add More



And my button to Add More doesn't do anything, but the one to delete works perfectly.
Could you help me?
sueannev commented 9 years ago

I had a similar problem and tracked it to a line in MetaBox.php that uses jQuery's :first selector.

$('[class*=docopy-]').click(function(e) { ... var the_group = $('.wpa_group-'+ the_name +':first.tocopy', p); ... }

I changed the line to use jQuery filter instead as follows: var the_group = $('.wpa_group-'+ the_name +'.tocopy', p).filter(':first');

Disco!

farinspace commented 8 years ago

cleaning old issues .. if this is still an issue please reopen