Viewing 6 reply threads
  • Author
    Posts
    • #4687
      ndbe
      Member
      piklist('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).

    • #4693
      Steve
      Keymaster

      Do 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?

    • #4695
      Steve
      Keymaster

      Also, 'serialize' => true, is not a valid parameter for Piklist.

    • #4699
      mcmaster
      Member

      @ndbe, what version of Piklist are you using? I think this may be a bug that is fixed in the current Beta, 0.9.9.4.

    • #4713
      ndbe
      Member

      @Steve Why not? I took it from the user guide and its doing what it should do.

      @mcmaster
      0.9.9.2 but I will test 0.9.9.4

    • #4714
      ndbe
      Member

      Ok upgrade fixed this so we can close the topic. Next Time I will remember to check for new version first.

    • #4717
      Steve
      Keymaster

      @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.

Viewing 6 reply threads
  • The topic ‘Editor with serialize’ is closed to new replies.