Tagged: AddMore issues in 0.9.9.9
- This topic has 3 replies, 2 voices, and was last updated 5 years, 5 months ago by
Steve.
Viewing 3 reply threads
-
AuthorPosts
-
-
September 1, 2016 at 9:05 am #7293
tronsebaParticipantHi, I’m having issues with nested addmore groups. I define it properly but piklist reder it as different groups fileds of main group and not as nested fields groups. Also save it in the satabase as separate fields arrays.
this is my group field code:
piklist('field', array( 'type' => 'group' ,'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) ) ) ) ) ) ));It’s look complex but that is my data model.
Thanks
-
September 4, 2016 at 12:20 pm #7305
SteveKeymasterDo you really need groups within groups? It forces the fields to save a multidimensional array.
-
September 5, 2016 at 8:19 am #7311
tronsebaParticipantThe information I need to store it as complex as you can see, i know that is a multidimentional array, late I will consume it with a rest service and parse it into a movile app.
Anyway I found a workarrount ussing conditional fields.
Thanks.
-
September 6, 2016 at 11:52 am #7316
SteveKeymasterGreat! Closing ticket.
-
-
AuthorPosts
Viewing 3 reply threads
- The topic ‘[0.9.9.9] Add more problem’ is closed to new replies.