Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save the new field when I have multiple=true option #9

Open
limogin opened this issue Nov 13, 2018 · 1 comment
Open

Unable to save the new field when I have multiple=true option #9

limogin opened this issue Nov 13, 2018 · 1 comment

Comments

@limogin
Copy link

limogin commented Nov 13, 2018

I'm trying to do some as this:


     $cmb->add_field ( array (
      'name'       => __( 'Field title', 'ges' ),
      'desc'       => __( 'Field desc', 'ges' ),
      'id'         => $prefix.'_key',
      'type'       => 'term_ajax_search',
      'multiple'   => false,
      'query_args' =>array (
         'taxonomy'=>'custom_tax',
         'childless'=>true,
         'hide_empty'		=> false
      ),
      'repeatable' => true,
     ));

But I see this error message:
Warning: array_values() expects parameter 1 to be array

I think that when repeteable=true the contents of the field in meta_value in database is serialized. It is said, all the repeteable values are in a unique record. I have an existing declaration that I want to change by this functionallity but I will lose all values if I try to do so.

It is not possible to save the same storage criteria?

@hellofriend321
Copy link

Also ran into this.

(Similar to this, Ive had trouble also saving the data when attempting to override the meta value save so a term can be set on the post instead of saving as post_meta..... I will create new Issue for this with additional info to describe. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants