diff --git a/vimeo.module b/vimeo.module index 86707ad..3eb720e 100644 --- a/vimeo.module +++ b/vimeo.module @@ -987,7 +987,9 @@ function vimeo_browser_process($element, $form_state, $complete_form) { $field = $form_state['field'][$element['#parents'][0]][$element['#parents'][1]]['field']; $instance = $form_state['field'][$element['#parents'][0]][$element['#parents'][1]]['instance']; - $field_name = explode('_', $field['field_name']); + $field_name_parts = explode('_', $field['field_name']); + array_shift($field_name_parts); + $field_name = implode('_', $field_name_parts); $settings = array(); $settings['title'] = $instance['label']; @@ -1004,14 +1006,14 @@ function vimeo_browser_process($element, $form_state, $complete_form) { $hash = md5(rand() * rand()); - $button = '' . t('Remove') . ' | ' . t('Refresh') . ''; + $button = '' . t('Remove') . ' | ' . t('Refresh') . ''; $thumb = ''; $title = $data['title']; $owner = $data['user_name']; $vid = $element['#value'][$field_key]; } else { - $button = '' . t('Browse') . ''; + $button = '' . t('Browse') . ''; $thumb = NULL; $title = NULL; $owner = NULL; @@ -1027,7 +1029,7 @@ function vimeo_browser_process($element, $form_state, $complete_form) { '#attributes' => array('class' => array('vimeo-field-id')), '#field_prefix' => '
' . $thumb . '
', '#field_suffix' => '
' . $title . '
' . $owner . '
' . $button . '
', - '#prefix' => '
', + '#prefix' => '
', '#suffix' => '
', // The following values were set by the content module and need // to be passed down to the nested element.