Git Product home page Git Product logo

reusable-custom-wordpress-meta-boxes's People

Contributors

miharekar avatar robvermeer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reusable-custom-wordpress-meta-boxes's Issues

NONCE index error

When using this script to create multiple meta boxes, I was throwing errors related to the nonce and it looks like you are not checking to see if the nonce is set in addition to verifying it.

I was able to solve the issue by changing the following in meta_box.php:

Change this:

// verify nonce
if (!wp_verify_nonce($_POST[$page.'_meta_box_nonce'], basename(__FILE__))) 
      return $post_id;

To This:

// if nonce exists, verify nonce
if ( !isset( $_POST[$page.'_meta_box_nonce'] ) || !wp_verify_nonce( $_POST[$page.'_meta_box_nonce'], basename( __FILE__ )))
    return $post_id;

tcnmy_find_field_type

I get this error when I include this Call to undefined function tcnmy_find_field_type() in .../metaboxes/meta_box.php on line 33

issue with post list field and multiple post types

   
array( // Post ID select box
        'label' => 'Post List', // 
        'desc'  => 'A description for the field.', // description
        'id'    =>  $prefix.'post_id', // field id and name
        'type'  => 'post_select', // type of field
        'post_type' => array('post','page') // post types to display, options are prefixed with their post type
    ),

In the sample.php you're creating this field, and passing a post_type array, but in the code, you are not checking for an array. I think you need to use a foreach on the $post_type variable

Calls to template paths don't play well with child themes

When a child theme is being used the constant TEMPLATEPATH and the function calls get_bloginfo('template_directory') and get_template_directory_uri(), all return the path to a parent theme and not the active child theme.

Part of the value of child themes is to use and customize theme frameworks while still leaving them easy to upgrade. Relying on function that call the template path forces users of this tool to add it and the function calls that use it to the parent theme even if they are using a child theme. This makes upgrading that theme more difficult and time consuming and can force a developer to separate their custom code into two separate theme directories.

By using different functions and constants its possible to get the path of a child theme if one is being used while getting the same value as the functions listed above if no child theme is in use.

Unless I'm missing a reason that makes the template functions more desirable than the stylesheet variants my suggestion is to do the following :

  • In functions.php replace the TEMPLATEPATH constant with either STYLESHEETPATH or get_stylesheet_directory() which is what's used to populate the constant in the wp-includes/default-constants.php file (line 295).
  • In meta_box.php on lines 9, 11, and 12 replace get_bloginfo('template_directory') with get_stylesheet_directory_uri(). The WP Codex page for get_bloginfo() seems to recommend that function instead of get_bloginfo('stlyesheed_directory') but doesn't explain why.
  • In meta_box.php on line 160 replace get_template_directory_uri() with get_stylesheet_directory_uri()

WP 3.5 Image Uploader Not Working

After upgrading to WP 3.5, it looks like the image field uploader will no longer work because of how the new media uploader is supposed to be called.

Any ideas?

issue with post_checkboxes type

Warning: Illegal offset type in /home/u478232299/public_html/wp-includes/post.php on line 1097

array(
        'label' => 'Работы', // <label>
        'desc'  => 'Список работ.', // description
        'id'    =>  $prefix.'works_list', // field id and name
        'type'  => 'post_checkboxes', // type of field
        'post_type' => array('works_type') // post types to display, options are prefixed with their post type
    ),

file wp-icludes/posts.php lines 1081 through 1101:

function get_post_type_object( $post_type ) {
    global $wp_post_types;

    if ( empty($wp_post_types[$post_type]) )
        return null;

    return $wp_post_types[$post_type];
}

Repeatable Image Isn't working

Thanks to your great code.
I face a problem on repeatable_fields.

I try to use repeatable fields of your code. But it's not uploading image with repeatable fields. This happen while i choose section fields form epeatable_fields. Can you Help me to resolve this. Or update your code.

problem

Repeatable Fields not working

I'm having issues with getting repeating fields to work properly. It looks like that section of the code isn't finished. The repeatable case type starts of by calling to a variable $field_titles on line 394 of meta_box.php which is supposed to be an array. But theres nothing in the code or in the mexabox sample file that defines it. It looks like theres supposed to be some sort of attribute to define the format of the repeatable field (text, texarea, image), perhaps another attribute in the repeatable array called "format" ? In this case anyway, I'm looking to create repeatable image upload fields. Anyone have ideas asa how to implement this? I'll try and experiment a little. I'm still a github noob, so I'm not sure if I'm supposed to "Fork" this code or not if I want to show changes...

Can no longer support this repo

I am looking for someone who might be willing to take over support for this. I no longer use this library for my own work, and thus cannot continue to support it. If you're interested, leave a comment here.

Textarea Size Issue

In Chrome the Textarea field type has been acting weird, and it turns out it had to do with the "cols" setting in the meta_box.php file. When using the default textarea setup in meta_box.php, my textarea box is way too wide and breaks flow of the admin screen.

Currently the "cols" property in the textarea case is set to cols="60" and should be cols="30"

Seems to fix my issue, let me know if I'm crazy, if now, you might want to think about changing it in the core.

Thanks again for your hard work and a fantastic plugin.

Problem with 2posttype metabox

I have a problem I try using just the metabox in two posttype in one i use DatePicker and in one repeatable Fields therefore have 2 file created and post type for each metabox the problem is it show in all posttype only Datepicker and not repeatable Fields

My qustion how can i use different metabox fields in different posttype ????

call to undefined function get_template_directory_uri()

I kept metaboxes folder inside the theme folder and included the php file path in functions. php but when i run the file I receive above error. I am new to github and meta boxes. Any help to resolve the issue and to explain further would be highly appriciated. Thanks in advance

Multi selection in selectbox

Does anyone getting issue in storing multiple selection of select box values in db. because when i have tried, it stores value as a single value, not as an array and the last value which i have selected is being stored in db.

Repeteables with image or file fields not working

Repeteables with image or file fields doesn't work.
If you set wp_debug to true you can see more info:

for images:

Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/lab01/wp-content/themes/twentyeleven_test/metaboxes/meta_box.php on line 245

and for file fields:

Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/lab01/wp-content/themes/twentyeleven_test/metaboxes/meta_box.php on line 245

Notice: Undefined variable: post in /var/www/lab01/wp-content/themes/twentyeleven_test/metaboxes/meta_box.php on line 219
Notice: Trying to get property of non-object in /var/www/lab01/wp-content/themes/twentyeleven_test/metaboxes/meta_box.php on line 219

I'm using 2 repeatables, 1 for images and another one for files(pdf docs).
image

Single Checkbox Won't Uncheck

Single checkbox meta fields won't "uncheck" and simply revert to the "checked" state upon saving the post.

I've rewritten the checkbox case to conditionally create a hidden input type with the same name as the checkbox input to allow for successful checking, unchecking, and rechecking of single checkboxes.

Below is my suggestion for replacing lines 62-66 of meta_box.php

// checkbox
case 'checkbox': 
echo '<input type="checkbox" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" ' . ($meta ? 'checked="checked"/><input type="hidden" name="' . esc_attr( $id ) . '"' : '').'/
<label for="' . esc_attr( $id ) . '">' . $desc . '</label>';
break;

Screen Shot 2013-02-13 at 11 40 27 AM

tax_checkboxes and tax_select won't work with hierarchical categories

I have a custom_taxonomy that is hierarchical.

When i use either tax_checkboxes or tax_select it doesn't seem to work in the right way: if i choose one the child category, after saving the data, the parent category is selected (and saved, if the user press the update button)

Warning: in_array() expects parameter 2 to be array, string given in C:\wamp\www\mytheme\wp-content\themes\mytheme\library\inc\metaboxes\meta_box.php on line 113

Hi,

First of all, thanks for sharing your work, everything is good. I just had this error message for the Post List field

"Warning: in_array() expects parameter 2 to be array, string given in C:\wamp\www\mytheme\wp-content\themes\mytheme\library\inc\metaboxes\meta_box.php on line 113"

The only change made was :
$sample_box = new custom_add_meta_box( 'sample_box', 'Sample Box', $fields, array('post','page','portfolio'), true );

But it's also broken if I let the post_type at "page"

Fatal error: Class 'custom_add_meta_box' not found

I tried to get these fields working but the Fatal error popped up...
Here is my CPT + Metabox//

/*========================================
                    MUSIC
========================================== */
 if(is_admin()) {  
    wp_enqueue_script('jquery-ui-datepicker');  
    wp_enqueue_style('jquery-ui-custom', get_template_directory_uri().'/inc/css/jquery-ui-custom.css');  
    wp_enqueue_script('custom-js', get_template_directory_uri().'/inc/js/custom-js.js');
}  
// metaboxes directory constant
define( 'meta_box', get_template_directory_uri() . '/metaboxes/meta_box.php' );

add_action('init', 'music_register');
function music_register() {
 
    $labels = array(
        'name' => _x('Music', 'post type general name'),
        'singular_name' => _x('Album', 'post type singular name'),
        'add_new' => _x('Add New', 'Album'),
        'add_new_item' => __('Add New Album'),
        'edit_item' => __('Edit Album'),
        'new_item' => __('New Album'),
        'view_item' => __('View Album'),
        'search_items' => __('Search Albums'),
        'not_found' =>  __('Nothing found'),
        'not_found_in_trash' => __('Nothing found in Trash'),
        'parent_item_colon' => ''
    );
 
    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        'rewrite' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'menu_position' => 5,
        'supports' => array('title', 'thumbnail')
      );
 
    register_post_type( 'Music' , $args );
}

$prefix = 'sample_';

$fields = array(
    array( // Image ID field
        'label' => 'Image', // 
        'desc'  => 'A description for the field.', // description
        'id'    => $prefix.'image', // field id and name
        'type'  => 'image' // type of field
    ),
    array( // Repeatable & Sortable Text inputs
        'label' => 'Repeatable', // 
        'desc'  => 'A description for the field.', // description
        'id'    => $prefix.'repeatable', // field id and name
        'type'  => 'repeatable', // type of field
        'sanitizer' => array( // array of sanitizers with matching kets to next array
            'featured' => 'meta_box_santitize_boolean',
            'title' => 'sanitize_text_field',
            'desc' => 'wp_kses_data'
        ),
        'repeatable_fields' => array ( // array of fields to be repeated
            'featured' => array(
                'label' => 'Featured?',
                'id' => 'featured',
                'type' => 'checkbox'
            ),
            array( // Image ID field
                'label' => 'Image', // 
                'id'    => 'image', // field id and name
                'type'  => 'image' // type of field
            ),
            'title' => array(
                'label' => 'Title',
                'id' => 'title',
                'type' => 'text'
            ),
            'desc' => array(
                'label' => 'Description',
                'id' => 'desc',
                'type' => 'textarea'
            )
        )
    )
);

/**
 * Instantiate the class with all variables to create a meta box
 * var $id string meta box id
 * var $title string title
 * var $fields array fields
 * var $page string|array post type to add meta box to
 * var $js bool including javascript or not
 */
$sample_box = new custom_add_meta_box( 'sample_box', 'Sample Box', $fields, 'post', true );

Uploaded the "Metaboxes" directory to my theme//
metabox

but yet the error remains...
What am I doing wrong?
Please, help...
Thank you.

Cannot redeclare the_field() ... line 15

Dear Tammy,

Sorry for this another thread but, I get an error: Cannot redeclare the_field() ... line 15
How can I fix this?

This fatal error comes, when I would like to install your metaboxes in my wordpress theme.

Thank you in advance.

File Uploader isn't saving file URL

I'm trying to upload a zip folder and create a download link with the URL that should be saved but it isn't working...
I'm not sure what to do.
Please help.

Images in Repeatable field saved with extra characters

It seems that images in repeatable fields are saved with some extra code (from what I can tell, an extra />, possibly a quote in there too).

This doesn't cause any problems when trying to save or retrieve the values, but it does appear on the backend after everything is saved.

I was able to resolve this in my recent fork, by adjusting line 206 in meta_box.php to use intval($meta) instead of just $meta. I wanted to see if there was a better solution before submitting a pull request.

Thanks!

Add a metabox to a specific page (with a page-template)

Hi there,

Is it possible to add different metaboxes to different pages? Lets say:

Homepage = 5 metaboxes (homepage-template.php)
About page = 3 metaboxes (about-template.php)

When I make a new page, I can select the page-template, update and then a specific metabox will show based on the chosen page-template.

Thank you in advanced!

Huig

post_type seems not to be correctly passed to post_list (and similar)

When using the post_list, post_select or post_chosen i always get a list of post only and seems impossibile to change it and show pages or custom post type.

I've managed to solve the issue adding

$post_type = isset( $field['post_type'] ) ? $field['post_type'] : null;

in meta_box.php, function the_field(), line 26, but i don't know if it's the right solution.

Numeric Value after uploading image.

Hello Sir, if any one can reply me fast - i will be very thankful.

When i upload image and update post or page. i will get numeric value of image in custom fields. like "35" , "41", "134" but i think it should show URL of Image. insteaded of Numeric value.

metaimage

It would be great if anyone can reply me today.

Prevent HTML tag strip

Hello,

I know you have declared that you will stop supporting this.

However i thought i would try my luck and ask if there is a way to prevent HTML tags from being stripped from input boxes?

I understand the code, its the bits of the wordpress API that gets me.

Would i simply have to remove this:

sanitize_text_field from the sanitizer array? (Just noticed this is default so wont matter if i remove)

I'll just close this now found what i was looking for.

changed sanitize_text_field to wp_kses_post.

Image Uploader doesn't work...

After transferring metaboxes directory to my mu-plugins directory the image uploader stopped working...

When I click the "choose image" button nothing pops up...
in my meta_box.php file I used this line to define the metaboxes directory:
define( 'CUSTOM_METABOXES_DIR', content_url() . '/mu-plugins/metaboxes' );

The CSS & Images work perfectly...I am able to add repeatable fields and remove them but the image uploader is the only thing not working....

I get these error essages in my Chroe Console:
Resource interpreted as Image but transferred with MIME type text/html: "http://domain.com/test/wp-content/themes/kidd/". post.php?post=1988&action=edit:34
2
Uncaught ReferenceError: wp is not defined scripts.js?ver=3.5.2:20
(anonymous function) scripts.js?ver=3.5.2:20
v.event.dispatch load-scripts.php?c=1&load%5B%5D=jquery,utils&ver=3.5.2:2
o.handle.u load-scripts.php?c=1&load%5B%5D=jquery,utils&ver=3.5.2:2

I can post whatever files need to be viewed but I'm not sure what is needed.

What can I do to get the uploader working again?

Please help.

Bug remove image

Hello Tammy,

When I would like to remove my selected image, the field will not be clear.. I use the latest jQuery code of yours:
[code]
// Delete uploaded image
jQuery('.remove-image').click(function() {
var defaultImage = $(this).parent().siblings('.default_image').text();
jQuery(this).parent().siblings('.upload_image').val('');
jQuery(this).parent().siblings('.preview_image').attr('src', defaultImage);
return false;
});
[/code]

Using fields

Could you please add how to output the repeatable fields on a page.

Thanks

does not show filename when uploading a file.

I cannot see the file name after uploading a file. Is there a way to see the filename after i have uploaded it? Also, with the WordPress 3.5 media uploader, the button to add the media says "add this image" after i have uploaded a new file.

Here is my code for the repeating field.

$fields = array(
    array(
        'label' => 'Album Tracks',
        'desc'  => 'Add all tracks here.',
        'id'    => $prefix . 'track',
        'type'  => 'repeatable',
        'sanitizer' => array(
            'track_name' => 'sanitize_text_field',
            'track_file' => 'wp_kses_data'
        ),
        'repeatable_fields' => array (
            'track_name' => array(
                'label' => 'Track Name',
                'id' => 'track_name',
                'type' => 'text'
            ),
            'track_file' => array(
                'label' => 'Track',
                'id' => 'track_file',
                'type' => 'file',
                'desc' => 'Upload the track.'
            )
        )
    )
);

How to use Reusable Custom fields from a mu-plugins.php?

I'd like to be sure that no matter what theme I use, the fields and CPTs are always in my admin, so I used a mu-plugins file.
When I implement these meta boxes into my "mu" file I get many errors...
However, when I place the CPT + Meta boxes inside of my functions.php , everything works perfectly...

How can I get them working from mu-plugins, so I can be sure that no matter what theme is used the CPT + Meta boxes are always in admin?
Please Help...

Adding context and priority

I wondered how can I set the context and priority of the metabox ?

So I've done some little improvements

On class Custom_Add_Meta_Box (line 408 meta_box.php) :

  • added (after var $page line 413):
    var $context;
    var $priority;
  • added (after $this->js = $js; line 422) :
    $this->context = $context;
    $this->priority = $priority;
  • changed line 526 :
    add_meta_box( $this->id, $this->title, array( $this, 'meta_box_callback' ), $page, $this->context, $this->priority);

Now on sample I call like this :
$sample_box = new custom_add_meta_box( 'sample_box', 'Sample Box', $fields, array('post','page','portfolio'), 'side', 'default', true );

PS : sorry but I'm not familiar with github

Adding fields to existing Metabox items.

This one may not be possible, but I am looking to display a list of custom post types that my website admin can select to show on their page and have an additional text field associated with each of the CPT's that are being selected.

Scenario:

  • Custom Post Type of Location has metaboxes with information specific to each location.
  • One of the metaboxes displayed in the location CPT is a post_checkbox metabox type that will display options from a different CPT (menu items).
  • I want the user to be able to select which of the global menu items they want to display for their location, but would also like them to be able to enter their location specific price for each of the menu items they wish to display.

Hopefully that makes sense. Any help that anyone can provide on how I might accomplish this with Tammy's plugin would be greatly appreciated.

Thank you in advance!

Javascript clone field

Dear,

I have running the repeatable fields. Now I want to repeat my row, which include an image upload and a text input. I can't get it work.

I have use your code:

// Add repeatable row
jQuery('.repeatable-add').click(function() { alert('Hello there!');
    // Clone row
    field = jQuery('.ui-sortable').closest('.ui-sortable').find('.row:last').clone(true);
    fieldLocation = jQuery('.ui-sortable').closest('.ui-sortable').find('.row:last');
    jQuery('input, img', field).val('').attr('name', function(index, name) {
        return name.replace(/(\d+)/, function(fullMatch, n) {
            return Number(n) + 1;
        });
    })
    field.insertAfter(fieldLocation, jQuery(this).closest('.ui-sortable'))
    return false;
});

How to get field data?

I was using the older version of Reusable Meta Boxes implemented these lines to get the data//

<?php $album_repeatable = get_post_meta($post->ID, 'album_repeatable', true);  
    echo '<ul class="album_repeatable">';  
    foreach ($album_repeatable as $string) {  
    echo '<li>"'.$string.'"</li>';  }  
    echo '</ul>'; 
?>

But now that doesn't even grab the data...
Please help...

WYSIWYG before repeatable breaks reapeatable

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'
)

Practices for required fields? (not an issue)

Hello, thanks for a wonderful library!

I am trying to find the best approach to field validation - checking if the input is correct (dates for non-js users, email, ...) AND required fields.

I know, that the original creator doesn't support the library anymore, so it's more of a question for the community. Can you guide me somewhere? I would be glad to share my knowledge if I encounter something useful myself.

Thank you!

Check box won't update

Hi, I have zero issues with any other type but for some reason the checkbox won't update. Is anyone else experienced this?

I haven't tampered with metabox.php and below is the code for creating the specific metabox.

$featuredpost = array(
    array( // Text Input
        'label' => 'Display in Slider:', // 
        'desc'  => 'Is this a featured post', // description
        'id'    => $prefix.'featured_slider', // field id and name
        'type'  => 'checkbox' // type of field
    )
);


$featured_box = new custom_add_meta_box( 'featured', 'Featured Post', $featuredpost, $right_category, false );

Any advice would be greatly appreciated.

Repeatable/Sortable fields not saving sort order

I am having trouble with the Repeatable/Sortable field type. The information is saved correctly and I can create/delete repeatable fields, but after resorting them, the new position is not being saved. Is there something that I am missing?

You will find the field setup that I am using for this field below.

Thank you in advance for the help!


$location_offer_fields = array(
        array( 
        'label' => '', 
        'desc'  => 'Enter your location offers above', 
        'id'    => $prefix.'location_offers', 
        'type'  => 'repeatable', 
        'sanitizer' => array( 
            'title' => 'sanitize_text_field',
            'desc' => 'wp_kses_data'
        ),
        'sanitizer' => array( 
            'title' => 'sanitize_text_field',
            'desc' => 'wp_kses_data'
        ),
        'repeatable_fields' => array( 
            'title' => array(
                'label' => 'Title',
                'id' => 'title',
                'type' => 'text'
            ),
            'desc' => array(
                'label' => 'Description',
                'id' => 'desc',
                'type' => 'textarea'
            )
        )
    )
    );
    

v0.4 category select issue

Hi Tammy,

Last night I was updating the files from your Reusable Custom Wordpress Meta Boxes version 0.3 to version 0.4. There is something wrong with the category select field. Everytime I save a post, it creates a new category. Is it possible to fix this problem?

Schermafbeelding 2013-02-14 om 20 19 39

Trouble getting 'Taxonomy Select Box' data

How do I get the 'Taxonomy Select Box' data?

I can pull all the other data fields easily via get_post_meta like so:

ID, 'sample_text', true) ?>

However I am having trouble referencing the Taxonomy Select Box data. I assume I'm missing something simple but am lost.

What would be the code to echo the selected taxonomy category name or ID? When I use the tag, I don't see any data being displayed for the taxonomy select.

PS. Thanks for the great tutorial and sharing your code.

Javascript for repeatable fields not being queued

It looks like back.js was created to replace the custom-js.js file used in the tutorials at wp.tutsplus.com but it looks like the bits relevant to repeatable fields weren't copied over.

Since custom-js.js isn't being queued anymore that means there's nothing to run when the repeatable field buttons get clicked.

Repeatable Fields not working

Working off the most recent version, I'm trying to include a metabox that has a set of reusable fields, allowing the user to upload an image and set a caption, and do this for as many image/captions as they wish.

When including the full sample.php code, everything seems to work fine until I remove the "jQuery UI Date input" and the "jQuery UI Slider" sample fields. Once these are removed, neither the repeatable nor the image uploader work (not even an image uploader outside of the repeat block).

It appears that if you do not include one or both of the UI fields, the jquery needed for the image field and the repeating is not loaded correctly.

I'd try to fork and fix this, but I'm not quite sure where to begin.

Install problem: fatal error / Qustion about repeatable_id

Dear Tammy,

When I would like to install your source to my wordpress theme, I get an fatal error:
Fatal error: Cannot redeclare the_field() in metaboxes/meta_box.php on line 15

Line 15:
function the_field( $field, $meta = null, $repeatable = null ) {

Also I had the question where the class "repeatable_id" is declared, because you use this id for the repeatable javascript code...

    $('input.repeatable_id:text').each(function(){ arr.push($(this).val()); }); 
    clone.find('input.repeatable_id')
        .val(Number(Math.max.apply( Math, arr )) + 1);
    if (!!$.prototype.chosen) {
        clone.find('select.chosen')
            .chosen({allow_single_deselect: true});
    }

Thank you for advance.
Caspert

No input field in repeatable fields

The repeatable fields don't seem to have input fields in them, so I can't actually add any data to them.

It looks like that type of field in the repeatable fields need to be defined somewhere, but I can't work out how.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.