Support

Account

Home Forums ACF PRO Custom Field Type with Repeater

Helping

Custom Field Type with Repeater

  • Not sure if I just missed a key piece of documentation but how do I call acf_render_field_setting() when I want to use ‘repeater’ as the ‘type’?

    Tried this:

    acf_render_field_setting( $field, array(
    			'label'			=> __('Answers','acf-assessment'),
    			'instructions'	=> __('Add possible answers','acf-assessment'),
    			'type'			=> 'repeater',
    			'name'			=> 'font_size',
    			'prepend'		=> 'px',
    		));

    And it says:
    Warning: Cannot use a scalar value as an array in /var/www/wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php on line 156

    Warning: Invalid argument supplied for foreach() in /var/www/wp-content/plugins/advanced-custom-fields-pro/pro/fields/repeater.php on line 255

  • Have you figured this out. I’m not sure what the error means, but I think that render_field_settings is looking for something like ‘text’, ‘select’, ‘radio’ or ‘textarea’, but I can’t be sure. There really isn’t any documentation on calling the function directly, at least not that I’ve found, it’s usually used inside the render_field method of a field type.

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

The topic ‘Custom Field Type with Repeater’ is closed to new replies.