tammyhart / Reusable-Custom-WordPress-Meta-Boxes

177 stars 97 forks source link

WYSIWYG before repeatable breaks reapeatable #21

Closed fourleafed closed 11 years ago

fourleafed commented 11 years ago

Below config breaks the repeatable (WYSIWYG before repeatable). I can not add more repeatables. Is it just me or can someone replicate this?

array(
    'label' => 'Function',
    'desc'  => 'A description goes here',
    'id'    => 'editorField',
    'type'  => 'editor',
    'sanitizer' => 'wp_kses_post',
    'settings' => array(
        'textarea_name' => 'editorField'
    )
),
array(
    'label' => 'Achievements',
    'desc'  => 'A description for the field.',
    'id'    => $prefix . 'achievements',
    'sanitizer' => array(
        'featured' => 'meta_box_santitize_boolean',
        'title' => 'sanitize_text_field',
        'desc' => 'wp_kses_data'
    ),
    'repeatable_fields' => array (
        'title' => array(
            'label' => 'Achievement',
            'id' => 'title',
            'type' => 'text'
        )
    ),
    'type'  => 'repeatable'
)
fourleafed commented 11 years ago

Could it also be that the settings argument for the editor also don't work? Or is it me? :-|

tammyhart commented 11 years ago

you're right, there was a missing index for the field to work. I've fixed this in the latest commit. update and try now.

tammyhart commented 11 years ago

I don't that's the only reason why your repeatable wasn't working. I found an error today that kept the javascript from being loaded for repeatables. It should be fixed up now and working correctly.