Could you go into a little more detail on what you did williamotto? I need the same type of functionality. After you create the field group and then export to PHP. Where are you putting this code at? The custom template you are referring to.. is it a backend template or a frontend template?