Viewing 4 reply threads
  • Author
    Posts
    • #2629
      Sander Schat
      Member

      Hi!
      I have an issue with the ‘editor’ in a group_field and with the ‘add_more’ option turned on.
      (yes, a lot is possible with Piklist 🙂 )

      here is the code:

      piklist( 'field', array(
      	'type'   => 'group',
      	'add_more' => true,
      	'field'  => 'expire_check_1',
      	'label'  => 'Template 1 ',
      	'help'   => 'Template voor als een product er bijna op zit',
      	'fields' => array(
      		array(
      			'type'       => 'text',
      			'field'      => 'subject',
      			'label'      => 'Onderwerp',
      			'attributes' => array(
      				'class'       => 'large-text',
      				'placeholder' => 'Your awesome onderwerp hier'
      			)
      		),
      		array(
      			'type'  => 'number',
      			'field' => 'days',
      			'label' => 'Aantal dagen voor afloop:',
      		),
      		array(
      			'type'    => 'editor',
      			'field'   => 'message',
      			'label'   => 'Bericht',
      			'options' => array(
      				'wpautop'       => false,
      				'media_buttons' => false,
      				'teeny'         => true,
      				'quicktags'     => false,
      				'tinymce'       => true
      
      			)
      		)
      
      	)
      ) );
      

      And attached is the screenshot, áfter hitting the ‘+’ sign

      When i have a single ‘editor-field’ with ‘add_more’, it does work fine
      But fails when using it in a ‘group’ field

      any ideas for fixes?

      Attachments:
      You must be logged in to view attached files.
    • #2634
      Steve
      Keymaster

      @Sander Schat– I can’t reproduce. The code you posted seems to work.

    • #2635

      I have also had problems using this. When I press the + button, I get an editor form that is prefilled with data, and then another form straight beneath it. I’m currently running the latest beta.

      My code:

      piklist('field', array(
      	'type'    => 'group',
      	'field'   => 'templates',
      	'add_more' => TRUE,
      	'label'   => __('Mallar', 'wpk-solquote'),
      	'fields'  => array(
      		array(
      			'type' => 'text'
      		,'field' => 'name'
      		,'label' => __('Mallnamn', 'wpk-solquote')
      		),
      
      		array(
      	'type' => 'editor'
      ,'field' => 'template'
      ,'label' => __('Offertmall', 'wpk-solquote')
      		)
      	)
      ));
    • #2636

      Attached a screenshot.

      Attachments:
      You must be logged in to view attached files.
    • #2646
      Steve
      Keymaster

      @wpkonsulterna– Use the Piklist grid system and set the columns to 12:

      piklist('field', array(
        'type'    => 'group',
        'field'   => 'templates',
        'add_more' => TRUE,
        'label'   => __('Mallar', 'wpk-solquote'),
        'fields'  => array(
          array(
            'type' => 'text'
            ,'field' => 'name'
            ,'label' => __('Mallnamn', 'wpk-solquote')
            ,'columns' => 12
          ),
          array(
            'type' => 'editor'
            ,'field' => 'template'
            ,'label' => __('Offertmall', 'wpk-solquote')
            ,'columns' => 12
          )
        )
      ));
      
Viewing 4 reply threads
  • You must be logged in to reply to this topic.