Support

Account

Home Forums Add-ons Flexible Content Field Conditional rules error Reply To: Conditional rules error

  • The php export is:

    if(function_exists("register_field_group"))
    {
    	register_field_group(array (
    		'id' => 'acf_long-page',
    		'title' => 'Long page',
    		'fields' => array (
    			array (
    				'key' => 'field_5',
    				'label' => 'Layout',
    				'name' => 'long_page_layout',
    				'type' => 'flexible_content',
    				'layouts' => array (
    					array (
    						'label' => 'Fritekst',
    						'name' => 'fritekst',
    						'display' => 'row',
    						'min' => '',
    						'max' => '',
    						'sub_fields' => array (
    							array (
    								'key' => 'field_51d51ce1bf114',
    								'label' => 'Title',
    								'name' => 'title',
    								'type' => 'title',
    								'column_width' => '',
    							),
    							array (
    								'key' => 'field_6',
    								'label' => 'Content',
    								'name' => 'content',
    								'type' => 'wysiwyg',
    								'column_width' => '',
    								'default_value' => '',
    								'toolbar' => 'full',
    								'media_upload' => 'yes',
    							),
    							array (
    								'key' => 'field_51d51cecbf115',
    								'label' => 'Include in menu',
    								'name' => 'include_in_menu',
    								'type' => 'true_false',
    								'instructions' => 'Gjelder for engelsk og tysk',
    								'column_width' => '',
    								'message' => 'Vis i toppmeny',
    								'default_value' => 0,
    							),
    							array (
    								'key' => 'field_51d5460254d84',
    								'label' => 'Menu title',
    								'name' => 'menu_title',
    								'type' => 'text',
    								'instructions' => 'Vil vises i toppmenyen',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'formatting' => 'none',
    								'maxlength' => '',
    							),
    						),
    					),
    					array (
    						'label' => 'Slider',
    						'name' => 'slider',
    						'display' => 'row',
    						'min' => '',
    						'max' => '',
    						'sub_fields' => array (
    							array (
    								'key' => 'field_7',
    								'label' => 'Royalslider id',
    								'name' => 'royalslider_id',
    								'type' => 'number',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'min' => '',
    								'max' => '',
    								'step' => '',
    							),
    						),
    					),
    					array (
    						'label' => 'Highlights-linje',
    						'name' => 'highlight_strip',
    						'display' => 'row',
    						'min' => '',
    						'max' => '',
    						'sub_fields' => array (
    							array (
    								'key' => 'field_8',
    								'label' => 'Content Blocks',
    								'name' => 'content_blocks',
    								'type' => 'relationship',
    								'column_width' => '',
    								'return_format' => 'object',
    								'post_type' => array (
    									0 => 'content_block',
    								),
    								'taxonomy' => array (
    									0 => 'all',
    								),
    								'filters' => array (
    									0 => 'search',
    								),
    								'result_elements' => array (
    									0 => 'post_type',
    									1 => 'post_title',
    								),
    								'max' => 3,
    							),
    						),
    					),
    					array (
    						'label' => 'Bilde og tekst',
    						'name' => 'bilde_og_tekst',
    						'display' => 'row',
    						'min' => '',
    						'max' => '',
    						'sub_fields' => array (
    							array (
    								'key' => 'field_39',
    								'label' => 'Title',
    								'name' => 'title',
    								'type' => 'title',
    								'instructions' => 'overskriften',
    								'column_width' => '',
    							),
    							array (
    								'key' => 'field_10',
    								'label' => 'Content',
    								'name' => 'content',
    								'type' => 'wysiwyg',
    								'column_width' => '',
    								'default_value' => '',
    								'toolbar' => 'full',
    								'media_upload' => 'no',
    							),
    							array (
    								'key' => 'field_11',
    								'label' => 'Image',
    								'name' => 'image',
    								'type' => 'image',
    								'column_width' => '',
    								'save_format' => 'id',
    								'preview_size' => 'event-thumb',
    								'library' => 'all',
    							),
    							array (
    								'key' => 'field_51d51c87bf112',
    								'label' => 'Include in menu',
    								'name' => 'include_in_menu',
    								'type' => 'true_false',
    								'instructions' => 'Gjelder for engelsk og tysk side',
    								'column_width' => '',
    								'message' => 'Vis i toppmeny',
    								'default_value' => 0,
    							),
    							array (
    								'key' => 'field_51d5463154d85',
    								'label' => 'Menu title',
    								'name' => 'menu_title',
    								'type' => 'text',
    								'instructions' => 'Vil vises i toppmenyen',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'formatting' => 'none',
    								'maxlength' => '',
    							),
    						),
    					),
    					array (
    						'label' => 'Galleri/bildemeny',
    						'name' => 'galleri',
    						'display' => 'row',
    						'min' => '',
    						'max' => '',
    						'sub_fields' => array (
    							array (
    								'key' => 'field_14',
    								'label' => 'Bilde 1',
    								'name' => 'bilde_1',
    								'type' => 'image',
    								'column_width' => '',
    								'save_format' => 'id',
    								'preview_size' => 'event-thumb',
    								'library' => 'all',
    							),
    							array (
    								'key' => 'field_18',
    								'label' => 'Tittel 1',
    								'name' => 'tittel_1',
    								'type' => 'text',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'formatting' => 'html',
    								'maxlength' => '',
    							),
    							array (
    								'key' => 'field_19',
    								'label' => 'Link 1',
    								'name' => 'link_1',
    								'type' => 'page_link',
    								'column_width' => '',
    								'post_type' => array (
    									0 => 'page',
    								),
    								'allow_null' => 0,
    								'multiple' => 0,
    							),
    							array (
    								'key' => 'field_15',
    								'label' => 'Bilde 2',
    								'name' => 'bilde_2',
    								'type' => 'image',
    								'column_width' => '',
    								'save_format' => 'id',
    								'preview_size' => 'event-thumb',
    								'library' => 'all',
    							),
    							array (
    								'key' => 'field_23',
    								'label' => 'Tittel 2',
    								'name' => 'tittel_2',
    								'type' => 'text',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'formatting' => 'html',
    								'maxlength' => '',
    							),
    							array (
    								'key' => 'field_20',
    								'label' => 'Link 2',
    								'name' => 'link_2',
    								'type' => 'page_link',
    								'column_width' => '',
    								'post_type' => array (
    									0 => 'all',
    								),
    								'allow_null' => 1,
    								'multiple' => 0,
    							),
    							array (
    								'key' => 'field_16',
    								'label' => 'Bilde 3',
    								'name' => 'bilde_3',
    								'type' => 'image',
    								'column_width' => '',
    								'save_format' => 'id',
    								'preview_size' => 'event-thumb',
    								'library' => 'all',
    							),
    							array (
    								'key' => 'field_22',
    								'label' => 'Tittel 3',
    								'name' => 'tittel_3',
    								'type' => 'text',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'formatting' => 'html',
    								'maxlength' => '',
    							),
    							array (
    								'key' => 'field_25',
    								'label' => 'Link 3',
    								'name' => 'link_3',
    								'type' => 'page_link',
    								'column_width' => '',
    								'post_type' => array (
    									0 => 'page',
    								),
    								'allow_null' => 1,
    								'multiple' => 0,
    							),
    							array (
    								'key' => 'field_17',
    								'label' => 'Bilde 4',
    								'name' => 'bilde_4',
    								'type' => 'image',
    								'column_width' => '',
    								'save_format' => 'id',
    								'preview_size' => 'event-thumb',
    								'library' => 'all',
    							),
    							array (
    								'key' => 'field_21',
    								'label' => 'Tittel 4',
    								'name' => 'tittel_4',
    								'type' => 'text',
    								'column_width' => '',
    								'default_value' => '',
    								'placeholder' => '',
    								'prepend' => '',
    								'append' => '',
    								'formatting' => 'html',
    								'maxlength' => '',
    							),
    							array (
    								'key' => 'field_24',
    								'label' => 'Link 4',
    								'name' => 'link_4',
    								'type' => 'page_link',
    								'column_width' => '',
    								'post_type' => array (
    									0 => 'page',
    								),
    								'allow_null' => 1,
    								'multiple' => 0,
    							),
    						),
    					),
    				),
    				'button_label' => 'Add Row',
    				'min' => '',
    				'max' => '',
    			),
    		),
    		'location' => array (
    			array (
    				array (
    					'param' => 'page_template',
    					'operator' => '==',
    					'value' => 'page-long.php',
    					'order_no' => 0,
    					'group_no' => 0,
    				),
    			),
    		),
    		'options' => array (
    			'position' => 'normal',
    			'layout' => 'no_box',
    			'hide_on_screen' => array (
    				0 => 'excerpt',
    				1 => 'discussion',
    				2 => 'comments',
    				3 => 'author',
    				4 => 'format',
    				5 => 'categories',
    				6 => 'tags',
    			),
    		),
    		'menu_order' => 0,
    	));
    }

    I should also note, all content is printed. It just comes after the warning message.