Viewing 0 reply threads
  • Author
    Posts
    • #7286
      tronseba
      Participant

      Hi, I’m writing an add more field composed with several nested groups.

      For some reazon Piklist is not redering it properly.

      Could you help me with that: this is my code:

      piklist('field', array(
      'type' => 'group'
      ,'scope' => 'post_meta' 
      ,'field' => 'objetivos'
      ,'label' => 'Objetivos'
      ,"add_more"=>true    
      ,'columns' => 12
      ,'description' => __('Defina los objetivos a los que aplica esta tabla')
      ,'fields' =>array(
                                   array( "type"=>"select"
                                        ,"field"=>"obj_nutricion"
                                        ,"label"=>"Objetivos Nutricion"
                                        ,'columns' => 6
                                        ,'choices' =>$obj_nutricion)
          
                                  ,array("type"=>"group"
                                        ,"field"=>"comp_corp"
                                        ,"label"=>"Composicion Corporal"
                                        ,"add_more"=>true
                                        ,'columns' => 10
                                        ,"fields"=>array( 
                                                              array("type"=>"group"
                                                               ,"field"=>"general_cc"
                                                               ,"label"=>"Obj General"
                                                               ,"add_more"=>true
                                                               ,'columns' => 10
                                                               ,'fields' =>array(
                                                                                  array( "type"=>"select"
                                                                                        ,"field"=>"general_cc_obj"
                                                                                        ,"label"=>"Objetivo"
                                                                                        ,'columns' => 10
                                                                                        ,'choices' =>$obj_corp_gral
                                                                                       )
                                                                                 ,array("type"=>"select"
                                                                                        ,"field"=>"focus_gral_cc"
                                                                                        ,"label"=>"Focus"
                                                                                        ,'columns' => 2
                                                                                        ,'choices' =>$focus)
                                                                                 )
                                                                  )
      
                                                             ,array("type"=>"group"
                                                               ,"field"=>"especifico_cc"
                                                               ,"label"=>"Especifico"
                                                               ,"add_more"=>true
                                                               ,'columns' => 10
                                                               ,"fields"=>array(
                                                                                  array( "type"=>"select"
                                                                                        ,"field"=>"zona_cc_esp"
                                                                                        ,"label"=>"Zona"
                                                                                        ,'columns' => 8
                                                                                        ,'choices' =>$obj_corp_esp_zona)
      
                                                                                 ,array( "type"=>"select"
                                                                                        ,"field"=>"objetivo_cc_esp"
                                                                                        ,"label"=>"Objetivo"
                                                                                        ,'columns' => 8
                                                                                        ,'choices' =>$obj_corp_esp_obj)
      
                                                                                 ,array("type"=>"select"
                                                                                        ,"field"=>"focus_esp_cc"
                                                                                        ,"label"=>"Focus"
                                                                                        ,'columns' => 2
                                                                                        ,'choices' =>$focus)
                                                                               )
                                                                 )
                                 
                                                      )
                                      
                                      )
          
                                  ,array("type"=>"group"
                                        ,"field"=>"rend"
                                        ,"label"=>"Rendimiento"
                                        ,"add_more"=>true
                                        ,'columns' => 12
                                        ,"fields"=>array( 
                                                          array("type"=>"group"
                                                               ,"field"=>"especifico_rend"
                                                               ,"label"=>"Especifico"
                                                               ,"add_more"=>true
                                                               ,'columns' => 10
                                                               ,"fields"=>array(
                                                                                  array( "type"=>"select"
                                                                                        ,"field"=>"zona_rend_esp"
                                                                                        ,"label"=>"Zona"
                                                                                        ,'columns' => 8
                                                                                        ,'choices' =>$zonas_esp_rend)
      
                                                                                 ,array( "type"=>"select"
                                                                                        ,"field"=>"objetivo_rend_esp"
                                                                                        ,"label"=>"Objetivo"
                                                                                        ,'columns' => 8
                                                                                        ,'choices' =>$obj_esp_rend)
      
                                                                                 ,array("type"=>"select"
                                                                                        ,"field"=>"focus_esp_rend"
                                                                                        ,"label"=>"Focus"
                                                                                        ,'columns' => 2
                                                                                        ,'choices' =>$focus)
                                                                              )
                                                              
                                                              )
      
                                                          ,array("type"=>"group"
                                                               ,"field"=>"general_rend"
                                                               ,"label"=>"Obj General"
                                                               ,"add_more"=>true
                                                               ,'columns' => 10
                                                               ,'fields' =>array(
                                                                                  array( "type"=>"select"
                                                                                        ,"field"=>"general_rend_obj"
                                                                                        ,"label"=>"Objetivo"
                                                                                        ,'columns' => 10
                                                                                        ,'choices' =>$obj_gral_rend
                                                                                       )
                                                                                 ,array("type"=>"select"
                                                                                        ,"field"=>"focus_gral_rend"
                                                                                        ,"label"=>"Focus"
                                                                                        ,'columns' => 2
                                                                                        ,'choices' =>$focus)
                                                                                 )
                                                                  )
                                      )
                                 
                      )
      )));
      Attachments:
      You must be logged in to view attached files.
Viewing 0 reply threads
  • You must be logged in to reply to this topic.