I am trying to create a new field type for ACF that contains multiple inputs or stores an array of values. The reason is that I would like to have some interactivity and a custom layout for a group of input fields.
I followed this tutorial http://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-type/ and used the provided template: https://github.com/elliotcondon/acf-field-type-template which is really nice and well documented. Storing one value is pretty simple. I am using only this function from the template:
function create_field( $field )
{
echo '<textarea id="' . $field['id'] . '" rows="4" class="' . $field['class'] . '" name="' . $field['name'] . '" >' . $field['value'] . '</textarea>';
}
What do I have to change in order to use two or more inputs? Thanks!