Skip to:

Re: New Group creation fields



@boonebgorges My plan has hit a snag. I am having trouble using what you gave me above to include more then one set of form markups. Let me explain…if I include something like

function bbg_extra_group_fields_markup() {

this form is for a new data table that I created
add_action( ‘groups_custom_group_fields_editable’, ‘bbg_extra_group_fields_markup’ );

function bbg_save_extra_group_details() {

// form 1 processing goes here with insert/update
add_action( ‘groups_group_details_edited’, ‘bbg_save_extra_group_details’ );
add_action( ‘groups_create_group_step_save_group-details’, ‘bbg_save_extra_group_details’ );

The above formula works great! I created a new table and I am able to populate it with no issues. Now..this is where things get messy and I am having trouble trying to figure a way around it. I want to duplicate the same code above with another table for separate settings. I am using jquery show/hide to show the form that is needed for the desired group settings. Another words Group A gets one type of settings and Group B gets another inputing the data to their own data table. So if i duplicate the code above twice the processing clashes…meaning if both groups have a table field with the same name things get a little messed up processing. Is there a way to group the code for Group A and Group B? meaning ” function bbg_save_extra_group_details()” for Group A belongs to “function bbg_extra_group_fields_markup()” of Group A. I am thinking “if” statements but then not sure. I know it sounds confusing but again any ides would be greatly appreciated. Also forgot to mention that when I duplicated the functions for Group B I did name it something new. Thanks

Skip to toolbar