I want to remove the day field from a Date dropdown of a webform. How to do that? I tried with hook_form_alter() without success. Any suggestions? Thanks

  • can you post the code you tried, also you have to make sure to add a day before saving, you can use a custom validate function to handle this.
    – Attiks
    Oct 12, 2011 at 13:13
  • Finally I solved this creating two separate fields without the day.Also thanks for your answer.
    – sokratis
    Oct 12, 2011 at 13:21
  • 2
    @sokratis please either post your solution as an answer to the question and mark it accepted, or vote to close/delete your question
    – Laxman13
    Oct 12, 2011 at 13:34
  • You can use the same concepts mentioned in my answer to this question: drupal.stackexchange.com/questions/12510/…
    – LSU_JBob
    Oct 12, 2011 at 15:25

1 Answer 1


There seems to be no coding-free way to achieve this but to create a separate Number-type field for year and month.

Not the answer you're looking for? Browse other questions tagged or ask your own question.