Tagged: group editor
- This topic has 4 replies, 3 voices, and was last updated 6 years, 2 months ago by
bjoerns.
-
AuthorPosts
-
-
August 30, 2015 at 9:10 am #4280
oskarcafeMemberHi and thanks for a very useable plugin!
I have defined a repeatable group of fields, that contains one subheader (of type text input) and one subbody (of type editor). When editing a post and clicking plus to add a new group of subheader+subbody, a new group with plus and minus buttons appear as expected, but the subbody editor does not render (see screenshot).
When saving, reloading or loading a post, everything seems to render correctly, even if you previously added an editor that was not seen in the editor.
This has worked as expected before, I think – but I’m not sure – that this behaviour changed after my upgrade to WordPress version 4.3. I have tried earlier versions of Piklist in the current WP 4.3 setup but that doesn’t help. The bug persists in all themes I have tried.
This is my fields declaration code:
<?php /* Title: Content blocks Post Type: blocks-type-here */ piklist('field', array( 'type' => 'group', 'field' => 'content-blocks', 'label' => 'Content blocks', 'add_more' => true, 'fields' => array( array( 'type' => 'text', 'field' => 'subheader', 'label' => 'Subheader', ), array( 'type' => 'editor', 'field' => 'subbody', 'label' => 'Enter some contents here', ), ), ));Is this a known bug or am I missing something?
Attachments:
You must be logged in to view attached files. -
September 1, 2015 at 2:43 pm #4283
SteveKeymaster@oskarcafe– Welcome to the Piklist community!
There are some known issues with advanced fields like Editor and File upload, in Grouped Add-mores. You may want to try changing the Editor to a textarea.
Or you can try ungrouping the fields. This code will save subheader and subbody as separate meta keys. If you go this route please check your database so you can see how the data has been saved.
piklist('field', array( 'type' => 'group', //'field' => 'content-blocks', // REMOVING THIS PARAMETER 'label' => 'Content blocks', 'add_more' => true, 'fields' => array( array( 'type' => 'text', 'field' => 'subheader', 'label' => 'Subheader', ), array( 'type' => 'editor', 'field' => 'subbody', 'label' => 'Enter some contents here', ), ), )); -
December 3, 2015 at 5:39 am #5208
bjoernsMemberHi Steve
Has the bugs with file upload in group fields been resolved? Because I’m also having very strange things happening when using the following code. For the moment I will try with ungrouping the field.
Kind regards
Björnarray( 'type' => 'group' ,'field' => 'ausbildung_zeugnis' ,'label' => __('Diplom/Zeugnis') ,'columns' => '12' ,'add_more' => true ,'fields' => array( array( 'type' => 'text' ,'field' => 'ausbildung_zeugnis_bezeichnung' ,'label' => __('Bezeichnung') ,'columns' => '6' ,'help' => __('Wie heisst das Zeugnis? Entspricht normalerweise dem Dateinamen') ), array( 'type' => 'file' ,'field' => 'ausbildung_zeugnis_pdf' ,'label' => __('PDF','piklist') ,'columns' => '3' ,'help' => __('Bitte laden Sie hier das Zeugnis als PDF-Datei hoch') ,'options' => array( 'modal_title' => __('PDF hinzufügen','piklist') ,'button' => __('PDF hinzufügen','piklist') ) ,'validate' => array( array( 'type' => 'limit', 'options' => array( 'min' => 1, 'max' => 1 ) ) ) ), array( 'type' => 'file' ,'field' => 'ausbildung_zeugnis_bild' ,'label' => __('Titelbild','piklist') ,'columns' => '3' ,'help' => __('Bitte laden Sie hier ein Titelbild der PDF-Datei hoch') ,'options' => array( 'modal_title' => __('Bild hinzufügen','piklist') ,'button' => __('Bild hinzufügen','piklist') ) ,'validate' => array( array( 'type' => 'limit', 'options' => array( 'min' => 1, 'max' => 1 ) ) ) ) ) ), -
December 3, 2015 at 5:48 am #5209
bjoernsMemberHi Steve
I tried now without grouping, but then it’s even worse: I created two “Diplom/Zeugnis” (see code above) and in each of them I attached a pdf (see code above with field ‘ausbildung_zeugnis_pdf’) and an image (ausbildung_zeugnis_bild). This worked, but after publishing the two “Diplom/Zeugnis” are gone and I also don’t see in the post_meta-database table any entries.
Is this also a bug or am I doing things the wrong way?
Kind regards
Björn -
December 4, 2015 at 1:07 pm #5228
-
-
AuthorPosts
- The topic ‘Editor field in repeatable group does not appear when clicking plus button’ is closed to new replies.