Support

Account

Home Forums General Issues Add field group inside flexible layout via code Reply To: Add field group inside flexible layout via code

  • Why do you say there is no clone field available when using PHP?

    If this is because it’s not listed in the documentation, the documentation does not cover everything. You should be able to create a clone field.

    Create a clone field with settings you want to use. Then go to tools and generate PHP for the field group containing the clone field. Use that generated code as an example:

    
    array(
    	'key' => 'field_629780ffac6a2',
    	'label' => 'Clone',
    	'name' => 'clone',
    	'type' => 'clone',
    	'instructions' => '',
    	'required' => 0,
    	'conditional_logic' => 0,
    	'wrapper' => array(
    		'width' => '',
    		'class' => '',
    		'id' => '',
    	),
    	'clone' => array(
    		0 => 'group_5cdd8ef037a51',
    	),
    	'display' => 'seamless',
    	'layout' => 'block',
    	'prefix_label' => 0,
    	'prefix_name' => 0,
    )