组合输入框

效果图

范例:

  1. $ashu_meta[] = array(
  2.   'name' => 'Input And Upload',
  3.   'id'   => 'input_upload',
  4.   'desc' => 'Set the type as group, And set the subtype as array, The fields as a group.',
  5.   'std'  => '',
  6.   'subtype' => array(
  7.     array(
  8.       'name' => 'Title',
  9.       'id'   => 'title',
  10.       'desc' => 'Title for image.',
  11.       'std'  => '',
  12.       'type' => 'text'
  13.     ),
  14.     array(
  15.       'name' => 'Link',
  16.       'id'   => 'link',
  17.       'desc' => 'Link for image',
  18.       'std'  => '',
  19.       'type' => 'text'
  20.     ),
  21.     array(
  22.       'name' => 'Image',
  23.       'id'   => 'image',
  24.       'desc' => 'Pleas upload a image, Or fill the blank with image uri.',
  25.       'std'  => '',
  26.       'button_text' => 'Upload',
  27.       'type' => 'upload'
  28.     ),
  29.   ),
  30.   'type' => 'group' //Look here.
  31. );

详解:

type - 值设置为group

subtype - 值为数组,数组中的各项为普通的配置项,数量不限。

其它:

'type' => 'group'和'multiple'    => true可同时配置,效果如图: