diff --git a/select_or_other.field_widget.inc b/select_or_other.field_widget.inc index ea65e46..574a854 100644 --- a/select_or_other.field_widget.inc +++ b/select_or_other.field_widget.inc @@ -370,8 +370,7 @@ function select_or_other_field_widget_settings_form($field, $instance) { function select_or_other_field_create_instance($instance) { if ( empty($instance['widget']['settings']['available_options']) && - empty($instance['widget']['settings']['available_options_php']) && - empty($instance['widget']['settings']['other']) + empty($instance['widget']['settings']['available_options_php']) ) { return; } @@ -394,8 +393,13 @@ function select_or_other_field_create_instance($instance) { select_or_other_tt($tkey . ':#allowed_values:' . htmlentities(trim($option)), $option, array('update' => TRUE)); } - select_or_other_tt($tkey . ':other', $settings['other'], array('update' => TRUE)); - select_or_other_tt($tkey . ':other_title', $settings['other_title'], array('update' => TRUE)); + if (!empty($settings['other'])) { + select_or_other_tt($tkey . ':other', $settings['other'], array('update' => TRUE)); + } + + if (!empty($settings['other_title'])) { + select_or_other_tt($tkey . ':other_title', $settings['other_title'], array('update' => TRUE)); + } } /**