• Resolved GradyD

    (@adroidman)


    I am wanting one label but multiple data to be under the label. I also want to reference each input option individually so that I can query for specific meta data. Currently I have,

    function custom_data_content( $post ) {
      wp_nonce_field( plugin_basename( __FILE__ ), 'custom_data_content_nonce' );
      $meta_values = get_post_meta($post->ID, 'file', true);
      echo '<label for="file"></label>';
      if($meta_values != '') {
        echo '<input type="text" id="fileName" name="fileName" placeholder="Enter the file name" value="' . $meta_values . '" /><br />';
      } else {
        echo '<input type="text" id="fileName" name="fileName" placeholder="Enter the file name" /><br />';
      }
      echo '<input type="text" id="fileSize" name="fileSize" placeholder="Enter the file size" /><br />';
      echo '<input type="text" id="version" name="version" placeholder="Enter the version" /><br />';
      echo '<input type="text" id="MD5" name="MD5" placeholder="Enter the MD5" />';
    }

    I have no idea how to reference each input using $meta_values. Can anyone help me?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multiple meta data inputs under one label’ is closed to new replies.