Support

Account

Home Forums General Issues Adding a repeater programmaticly in php

Helping

Adding a repeater programmaticly in php

  • Hi,

    I’m using the function “registerCustomField” for registering my field, and I need to add a repeater field, but I can’t add the “subfields” value.

    array (
    	'key' => 'field_dkflsdjflkdjsflkj',
    	'label' => __('Dettagli tecnici'),
    	'name' => 'technical_details',
    	'type' => 'repeater',
    	'instructions' => __('Inserisci i dettagli tecnici'),
    	'default_value' => '',
    	'placeholder' => '',
    	'repeater_fields' => array (
    		array (
    			'key' => 'field_dlkfjdlskjflks',
    			'label' => __('Gallery'),
    			'name' => 'gallery',
    			'type' => 'gallery',
    			'instructions' => __('Carica le immagini relative al prodotto'),
    			'default_value' => '',
    			'placeholder' => '',
    			'prepend' => '',	
    			'append' => '',
    			'formatting' => 'html',
    			'maxlength' => '',
    		)
    	),
    	'append' => '',
    	'maxlength' => '',
    ),

    I try with many key for the array of sub field, but it doesn’t work.

    There is a documentation for this function?

    Thanks.

    Paolo.

  • Well, i found that the key for it was “sub_fields”

    For the future, is There a documentation for this?

    Thanks

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

The topic ‘Adding a repeater programmaticly in php’ is closed to new replies.