Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Steve 4 years ago.

  • Author
    Posts
  • #5891

    slam
    Participant

    Good day,

    piklist('field',array(
        'type'      => 'group',
        'field'     => RECIPES_THEME_PREFIX . 'recipe_steps',
        'label'     => __('Recipe Step-by-Step'),
        'position'  => 'start',
        'columns'   => 12,
        'add_more'  => true,
        'fields'    => array(
            array(
                'type'  => 'file',
                'field' => RECIPES_THEME_PREFIX . 'recipe_step_image',
                'label' => __('Step Image')
            ),
            array(
                'type'      => 'editor',
                'field'     => RECIPES_THEME_PREFIX . 'recipe_step_description',
                'label'     => __('Step Description'),
                'options'   => array (
                    'wpautop'       => true,
                    'media_buttons' => false,
                    'tabindex'      => '',
                    'editor_css'    => '',
                    'editor_class'  => '',
                    'teeny'         => true,
                    'dfw'           => false,
                    'tinymce'       => true,
                    'quicktags'     => true,
                )
            )
        )
    ));

    Unfortunately, the group of fields aren’t saved correctly. Also, the group of fields doesn’t repeat correctly. As I understand, TinyMCE must be reinitialized after cloning.

    For example, I create two rows with image and description. After save I got this on output

    Array ( [amot_recipe_step_image] => Array ( [0] => Array ( [0] => 13 [1] => undefined [2] => 20 ) ) [amot_recipe_step_description] => Array ( [%22 data-piklist-field-group=%22a6d7f6d] => test desc [0] => test desc 2 ) )

    Thank you in advance!

  • #5902

    Steve
    Keymaster

    @slam– Welcome to the Piklist community!

    Are you using our latest beta? You can download it here. I believe it’s fixed in this version.

You must be logged in to reply to this topic.