Home Forums Backend Issues (wp-admin) Issue on creating a new multiple select field type


Issue on creating a new multiple select field type

  • I’m trying to create a original field type. I want this field type to be multi-selectable, like other acf field types.

    Using this template, I replaced the code of render_field function like below.

    function render_field( $field ) {
      $field['type'] = 'select';
      $field['ui'] = 1;
      $field['ajax'] = 1;
      $field['choices'] = array();
      acf_render_field( $field );

    These codes were copied from acf_field_post_object class. The field is rendered as shown in the first of two images. It looks like good because the appearance of the field is select box.

    However, adding $field[‘multiple’] = 1 to the above code, the field changes like number box (as shown in the second image).

    I’m confused this behavior. Is there something wrong with my way ?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.