Tagged: editor serialize
- This topic has 6 replies, 3 voices, and was last updated 6 years, 3 months ago by
Steve.
-
AuthorPosts
-
-
October 22, 2015 at 10:03 am #4687
ndbeMemberpiklist('field', array( 'field' => 'completed_project', 'type' => 'group', 'add_more' => true, 'template' => 'field', 'serialize' => true, 'fields' => array( array( 'type' => 'text', 'label' => __('Title', 'nd'), 'field' => 'title', 'columns' => 6 ), array( 'type' => 'editor', 'field' => 'description', 'template' => 'field', 'label' => __('Description', 'nd') ), ) ));Using this code the editor field is loosing line breaks. There is a line break saved to the database but after saving it is lost when the content is loaded in to editor field (no paragraph is inserted).
-
October 22, 2015 at 11:24 am #4693
SteveKeymasterDo you mean that it’s not rendering properly in the editor field in admin, or when you pull the data and display on the front end?
Can you provide a screenshot?
-
October 22, 2015 at 11:58 am #4695
SteveKeymasterAlso,
'serialize' => true, is not a valid parameter for Piklist. -
October 22, 2015 at 2:00 pm #4699
-
October 23, 2015 at 2:40 am #4713
-
October 23, 2015 at 2:49 am #4714
ndbeMemberOk upgrade fixed this so we can close the topic. Next Time I will remember to check for new version first.
-
October 23, 2015 at 2:19 pm #4717
SteveKeymaster@ndbe– “serialize” is no longer a parameter. I removed it from the docs.
The reason your group is saving as serialized data is because you’re setting a field
'field' => 'completed_project', at the group level.If you remove
'field' => 'completed_project', the data will save as individual rows (except settings and widgets).Hope that helps! Closing ticket.
-
-
AuthorPosts
- The topic ‘Editor with serialize’ is closed to new replies.