- This topic has 5 replies, 2 voices, and was last updated 4 years, 1 month ago by
Steve.
-
AuthorPosts
-
-
December 17, 2017 at 10:59 pm #8599
jasondalycanParticipantHi,
I noticed that when adding fields, if a group is added, then a normal (non-group) field is added afterwards that the non-group field renders before the group field.See the following modified code from the Piklist Demos and the attached screenshot — the ‘ingredient_type1’ field renders before the group that precedes it:
———————————————————————–piklist(‘field’, array(
‘type’ => ‘group’
,’field’ => ‘ingredient_section’
,’label’ => __(‘Ingredients’, ‘piklist-demo’)
,’add_more’ => true
,’fields’ => array(
array(
‘type’ => ‘text’
,’field’ => ‘ingredients_component_title’
,’label’ => __(‘Ingredient Title’, ‘piklist-demo’)
,’columns’ => 12
)
,array(
‘type’ => ‘checkbox’
,’field’ => ‘ingredient_type’
,’columns’ => 12
,’list’ => false
,’label’ => __(‘Meal Type’, ‘piklist-demo’)
,’choices’ => array(
‘appetizer’ => __(‘Appetizer’, ‘piklist-demo’)
,’entree’ => __(‘Entree’, ‘piklist-demo’)
,’main_course’ => __(‘Main Course’, ‘piklist-demo’)
)
)
,array(
‘type’ => ‘group’
,’field’ => ‘ingredient’
,’add_more’ => true
,’fields’ => array(
array(
‘type’ => ‘text’
,’field’ => ‘ingredient_qty’
,’label’ => __(‘Qty’, ‘piklist-demo’)
,’columns’ => 2
)
,array(
‘type’ => ‘textarea’
,’field’ => ‘ingredient_description’
,’label’ => __(‘Description’, ‘piklist-demo’)
,’columns’ => 10
,’attributes’ => array(
‘rows’ => 5
)
)
)
)
,array(
‘type’ => ‘checkbox’
,’field’ => ‘ingredient_type1′
,’columns’ => 12
,’list’ => false
,’label’ => __(‘Meal Type’, ‘piklist-demo’)
,’choices’ => array(
‘appetizer’ => __(‘Appetizer’, ‘piklist-demo’)
,’entree’ => __(‘Entree’, ‘piklist-demo’)
,’main_course’ => __(‘Main Course’, ‘piklist-demo’)
)
)
)
));Attachments:
You must be logged in to view attached files. -
December 18, 2017 at 12:39 pm #8604
SteveKeymaster@jasondalycan– Welcome to the Piklist community!
Try our latest beta and let us know if that fixes the issue >
-
December 21, 2017 at 5:38 pm #8624
jasondalycanParticipantThanks, although I tried 0.10 and the issue persists.
-
December 26, 2017 at 12:44 pm #8644
SteveKeymaster@jasondalycan– So, you want the second
Meal Typefield to appear after theingredientadd-more? -
December 26, 2017 at 1:18 pm #8645
jasondalycanParticipantYes correct. Is there a way to do this?
-
December 26, 2017 at 1:21 pm #8646
SteveKeymasterNot now.
The field is part of the main add-more, so it will show up there. There is no way to split an add-more.
-
-
AuthorPosts
- You must be logged in to reply to this topic.