⚠ 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

I need 2 types of edit for one table, each type will contain different fields. how can i do it using GC ?



Hasnain Shahriar

Hasnain Shahriar
  • profile picture
  • Member

Posted 29 March 2016 - 13:41 PM

I need 2 types of edit for one table, each type will contain different fields. how can i do it using GC ?

 


fractorr

fractorr
  • profile picture
  • Member

Posted 29 March 2016 - 16:21 PM

The way I did this was to have a drop down field for record type, then added some JavaScript so that when the field is changed I hide and show fields as needed.  I actually use the gc_with_tabs extension and just hide / show certain tabs instead of hiding / showing a list of fields.


titu

titu
  • profile picture
  • Member

Posted 30 March 2016 - 02:46 AM

you can just create two controllers with the same set_table but different add_fields and edit_fields.