I set up a site in drupal, and needed mostar fields of date type in the same way as other fields. the problem is that the fields of date type, create a fieldset unnecessary.

I'm try the solution Code Karate buts its only change the fieldset to label. see image:

Only local images are allowed.

what I wanted was that fields like date, stay equal to the remaining fields. for example, from above.

my code:

    /**
     * Remove fieldset from date inputs
     */
    function mytheme_date_combo($variables) {
    	dd($variables);
    	return theme('form_element', $variables);
    }

Comments

davidkp’s picture

I used the following code in the template.php file in my theme and it worked great once I cleared the cache.

function my_theme_name_date_combo($variables) {
  return theme('form_element', $variables);
}

I also added the following CSS to tidy things up which you may need to tweak for your theme,

.date-padding { padding: 0; }
.container-inline-date .form-item { margin: 0; }
.container-inline-date .description { display: none; }
.container-inline-date .date-padding { padding: 0; }
.container-inline-date input.form-text { margin-bottom: 0; }