Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I utilize the cloned elements effectively? #29

Open
foldesistudio opened this issue Feb 12, 2024 · 0 comments
Open

How can I utilize the cloned elements effectively? #29

foldesistudio opened this issue Feb 12, 2024 · 0 comments

Comments

@foldesistudio
Copy link

Hey folks,

Unfortunately, the News Feed group does not detect the button fields. What can you recommend to me?

Here is my code:

BUTTON for clone:

ACFComposer::registerFieldGroup( [
	'name'                   => 'group_65c343f377bc4' . '_misi',
	'title'                 => 'Buttons',
	'fields'                => array(
		array(
			'label'             => 'Button',
			'name'              => 'button_is_visible',
			'type'              => 'true_false',
			'instructions'      => '',
			'required'          => 0,
			'wrapper'           => array(
				'width' => '',
				'class' => '',
				'id'    => '',
			),
			'message'           => '',
			'default_value'     => 0,
			'ui'                => 0,
			'ui_on_text'        => '',
			'ui_off_text'       => '',
		),
		array(
			'label'             => 'Button Link',
			'name'              => 'button_link',
			'type'              => 'acfe_advanced_link',
			'instructions'      => '',
			'required'          => 1,
			'conditional_logic' => array(
				array(
					array(
						'field'    => 'button_is_visible',
						'operator' => '==',
						'value'    => '1',
					),
				),
			),
			'wrapper'           => array(
				'width' => '',
				'class' => '',
				'id'    => '',
			),
			'post_type'         => '',
			'taxonomy'          => '',
		),
			),
	'location'              => array(
		array(
			array(
				'param'    => 'post_type',
				'operator' => '==',
				'value'    => 'post',
			),
		),
	),
	'menu_order'            => 0,
	'position'              => 'normal',
	'style'                 => 'default',
	'label_placement'       => 'left',
	'instruction_placement' => 'label',
	'hide_on_screen'        => '',
	'active'                => true,
	'description'           => '',
	'acfe_display_title'    => '',
	'acfe_autosync'         => '',
	'acfe_form'             => 0,
	'acfe_meta'             => '',
	'acfe_note'             => ''
] );

IMPORT BUTTON TO HERE

ACFComposer::registerFieldGroup( [
	'name' => 'news_feeds',
	'title' => 'News Feeds',
	'fields' => array(
		//  Button field imported as clone field
		array(
			'label' => 'Button',
			'name' => 'button',
			'type' => 'clone',
			'instructions' => '',
			'required' => 0,
			'wrapper' => array(
				'width' => '',
				'class' => '',
				'id' => '',
			),
			'clone' => array(
				0 => 'group_65c343f377bc4' .'_misi',
			),
			'display' => 'seamless',
			'layout' => 'block',
			'prefix_label' => 0,
			'prefix_name' => 0,
		),
	),
	'location' => array(
		array(
			array(
				'param' => 'block',
				'operator' => '==',
				'value' => 'acf/newscard',
			),
		),
	),
	'menu_order' => 0,
	'position' => 'normal',
	'style' => 'default',
	'label_placement' => 'left',
	'instruction_placement' => 'label',
	'hide_on_screen' => '',
	'active' => true,
	'description' => '',
	'acfe_display_title' => '',
	'acfe_autosync' => '',
	'acfe_form' => 0,
	'acfe_meta' => '',
	'acfe_note' => '',
] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant