Tagged: add_more
- This topic has 0 replies, 1 voice, and was last updated 7 years, 2 months ago by
cosmocanuck.
-
AuthorPosts
-
-
December 3, 2014 at 3:35 pm #2941
cosmocanuckMemberHi again! Just testing my recipe metafields as per our previous discussion and have discovered something odd. For the “recipe steps” area, I changed my innermost add-more to an editor field (from a textarea one), and now, if I create a second section of recipe steps, I cannot enter the cursor into the field (and it lacks a toolbar).
It only breaks on the second iteration of the Steps group, and only now that I’ve made it an editor field. WP_Debug is on but no errors are showing up. I’ve triple-checked the docs re: editor fields and can’t find anything obvious (or non-obvious!) wrong.
My metafield code follows. Login to see the problem in action by creating a new Recipe and trying to add a second Steps section:
I can resend you the login details if needed, in a private followup.
Thanks!
adam<?php /* Title: Recipe Details Post Type: recipe Priority: high */ piklist('field', array( 'type' => 'editor' ,'field' => 'recipe_description' ,'template' => 'field' ,'label' => __('Description') ,'description' => __('Brief description/summary of the recipe') ,'options' => array( 'drag_drop_upload' => 'false' ,'tinymce' => true ,'quicktags' => true ) )); piklist('field', array( 'type' => 'text' ,'field' => 'recipe_serves' ,'label' => __('Servings') ,'description' => __('For example, "3-4"') ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'group' ,'field' => 'ingredient_section' ,'label' => __('Ingredients') ,'description' => __('Add additional Section if a recipe has separate listings for different parts, i.e. the salad and the dressing.') ,'add_more' => true ,'fields' => array( array( 'type' => 'html' ,'label' => __('Ingredient section') ,'columns' => 12 ,'value' => '<p><em><strong>Note:</strong> for consistency, please only capitalize sentences and Superior product names; otherwise keep all text lower case.</em></p>' ,'attributes' => array( 'class' => 'recipe-subhead' ) ) ,array( 'type' => 'text' ,'field' => 'ingredients_component_title' ,'label' => __('Section Title (can be omitted for first section, or if there’s only one)') ,'columns' => 12 ) ,array( 'type' => 'group' ,'field' => 'ingredient' ,'add_more' => true ,'fields' => array( array( 'type' => 'text' ,'field' => 'ingredient_qty' ,'label' => __('Qty') ,'columns' => 2 ) ,array( 'type' => 'textarea' ,'field' => 'ingredient_descrip' ,'label' => __('Description') ,'columns' => 10 ) ) ) ) )); piklist('field', array( 'type' => 'group' ,'field' => 'steps_section' ,'label' => __('Steps') ,'description' => __('Do not add numbers to the steps; they\'ll be added automatically.') ,'add_more' => true ,'fields' => array( array( 'type' => 'html' ,'label' => __('Group of steps') ,'columns' => 12 ,'value' => '' ,'attributes' => array( 'class' => 'recipe-subhead' ) ) ,array( 'type' => 'text' ,'field' => 'steps_component_title' ,'label' => __('Section Title (can be omitted if there’s only one section)') ,'columns' => 12 ) ,array( 'type' => 'group' ,'field' => 'step_group' ,'add_more' => true ,'fields' => array( array( 'type' => 'editor' ,'add_more' => true ,'field' => 'recipe_step' ,'label' => __('Recipe Step') ,'options' => array ( 'wpautop' => true ,'media_buttons' => false ,'tabindex' => '' ,'tinymce' => true ,'quicktags' => false ) ) ) ) ) ));
-
-
AuthorPosts
- The topic ‘Add-more text editor field not editable’ is closed to new replies.