jaredatch/Custom-Metaboxes-and-Fields-for-WordPress — Issue #107: Repeatable field and sort
Author: fjaillet
Created: 2012-02-03 10:44:10+00:00
State: open

```php
array(
'name' => 'Repeatable',
'desc' => 'A description for the field.',
'id' => $prefix.'repeatable',
'type' => 'repeatable'
) ,
```
and in metabox-functions

```php
case 'repeatable':
//$meta = get_post_meta( $post->ID, $field['id'], false );

echo '

';
//echo '+

';
$irepeat = 0;
if ($meta) {
foreach($meta as $row) {
echo '
|||-
';
$irepeat++;
}
} else {
echo '
|||-
';
}
echo '

';
echo ''.$field['desc'].'';
echo '

Add New

';
// only add the javascript once
static $added_js;
if ( ! $added_js ) : $added_js = true;?>