Quantcast
Channel: Tagged with repeater - Plugin Support
Viewing all articles
Browse latest Browse all 160

Js inside a new custom field create problem if used with Repeater Field

$
0
0

Hello, i am creating a new field that use PLUPLOAD for uploading an image. The field works but not when is used inside the repeater field. Problem i think is the id:

This is the part of js i have in function create_field($field):

```javascript

    jQuery(function($){

        var uploader = new plupload.Uploader({
            runtimes            : 'gears,html5,flash,silverlight,browserplus',
            browse_button   : '<?php echo $field['id']?>-pickfiles',
                            container           : '<?php echo $field['id']?>-container',
                             ...

`

That id i passed keep the "acfcloneindex" string inside, that means the string there is not converted with unique id ('acf-repeater/js/input.js' function _repeater.add_row line 254) while all the id inside the html tags (as

<

div id="<?php echo $field['id']?>-container" class="rcwdplupload-container">) are converted with unique id.

How can i fix it?


Viewing all articles
Browse latest Browse all 160

Latest Images

Trending Articles





Latest Images