Skip to main content
Added line breaks so that Markdown syntax highlighting will work
Source Link
mradcliffe
  • 5.9k
  • 4
  • 28
  • 41

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle in the ief tables module and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple by adding a separate settings option).

After the line ' // Allow other modules to alter the settings. drupal_alter('inline_entity_form_settings', $settings, $field, $instance);' add

 // Allow other modules to alter the settings.
drupal_alter('inline_entity_form_settings', $settings, $field, $instance);

add in the following code: if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) { if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) { $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']); } }

if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) {
    if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) {
        $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']);
    }
}

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle in the ief tables module and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple by adding a separate settings option).

After the line ' // Allow other modules to alter the settings. drupal_alter('inline_entity_form_settings', $settings, $field, $instance);' add in the following code: if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) { if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) { $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']); } }

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle in the ief tables module and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple by adding a separate settings option).

After the line

 // Allow other modules to alter the settings.
drupal_alter('inline_entity_form_settings', $settings, $field, $instance);

add in the following code:

if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) {
    if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) {
        $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']);
    }
}
added 62 characters in body
Source Link

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle in the ief tables module and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple by adding a separate settings option).

After the line ' // Allow other modules to alter the settings. drupal_alter('inline_entity_form_settings', $settings, $field, $instance);' add in the following code: if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) { if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) { $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']); } }

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple).

After the line ' // Allow other modules to alter the settings. drupal_alter('inline_entity_form_settings', $settings, $field, $instance);' add in the following code: if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) { if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) { $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']); } }

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle in the ief tables module and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple by adding a separate settings option).

After the line ' // Allow other modules to alter the settings. drupal_alter('inline_entity_form_settings', $settings, $field, $instance);' add in the following code: if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) { if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) { $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']); } }

Source Link

I managed to solve this by making changes to inline_entity_form.module specifically the inline_entity_form_settings function. This fix requires you to have already selected the target bundle and limits to only one content type (I'm sure someone can easily adapt this logic to include multiple).

After the line ' // Allow other modules to alter the settings. drupal_alter('inline_entity_form_settings', $settings, $field, $instance);' add in the following code: if (empty($settings['bundles']) && isset($instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles'])) { if (array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']) != false) { $settings['bundles'][] = array_search('1', $instance['widget']['settings']['type_settings']['ief_table_view_mode']['bundles']); } }