jaredatch/Custom-Metaboxes-and-Fields-for-WordPress — Issue #99: Add "cloneable_text" type
Author: joehoyle
Created: 2012-01-22 17:58:58+00:00
State: open

Not sure if this would be good to be included. I recently needed a "cloneable text list" i.e. Add / Remove text areas in a list style. I have attached a screen shot to illustrate this and pasted the code below if anyone want to use it.

It could do with a bit of cleaning up if this want's to be included.

![](http://i.imgur.com/IT7oz.png)

```PHP
add_action( 'cmb_render_cloneable_text', function( $field, $meta ) {

// meta won't have the multiples so get it again
global $post;

$meta = get_post_meta( $post->ID, $field['id'], false );

?>

X

X

X

Add New