⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Make a results as a TAB



archerwisdom
  • profile picture
  • Member

Posted 08 October 2013 - 15:35 PM

Hi,

 

I start getting obsessed with this wonderful CRUD. Thanks to the creator.

 

I read few Forum Topics and couldn't find what I intend to do.

Use the file example from http://www.grocerycrud.com/demo/film_management/add

 

Is it possible to group the actors by Male vs Female and display them as  a Tab .Please see the illustrator screen I want to achieve.

 

Assuming we have gender column in the 'actor' table

 

[attachment=694:Crud.png]


Amit Shah
  • profile picture
  • Member

Posted 10 October 2013 - 12:16 PM

Well you surely can go ahead and alter the code to your requirement. But i will rather suggest - you create 2 seperate fields for the same - that should solve your requirement and simplify your solution.


archerwisdom
  • profile picture
  • Member

Posted 17 October 2013 - 11:10 AM

Hi Amit,

 

You said:  "rather suggest - you create 2 seperate fields for the same" .

 

Did you mean something like this?

 

$crud->set_relation_n_n('actors_male', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname','priority', 'array(gender=>"MALE")');

$crud->set_relation_n_n('actors_female''film_actor''actor''film_id''actor_id''fullname','priority', 'array(gender=>"FEMALE")');


Amit Shah
  • profile picture
  • Member

Posted 22 October 2013 - 10:33 AM

Sorry for a delayed answer but yes - that is exactly wat i wanted to convey