Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial5 Answers
Micah Courey
20,168 PointsSo in this case you would implement the "_form" hook to create a custom form the module is called "custom_events" so the hook function you would create would be called "custom_events_form".
jason chan
31,009 Pointsarigato gozaimashita life safer. :)
Micah Courey
20,168 PointsThe quiz is testing your knowledge of Drupal hooks. Drupal's module system is based on the concept of "hooks". To extend Drupal, a module can implement a hook. When Drupal wishes to allow intervention from modules, it determines which modules implement a hook and calls that hook in all enabled modules that implement it. There are several hook functions built into Drupal's core and you call them from your module to implement them.
jason chan
31,009 PointsIf my module is named 'cool_new_menu' and I want to create a menu item in it, the function created in my 'cool_new_menu.module' file would be:
how do you fill in this blank? I'm like uh????
Micah Courey
20,168 PointsThe answer to the question is 'cool_new_menu_menu' because menu is the hook and the question says that the module name is 'cool_new_menu' and the full module name needs to come before the '_menu' hook.
jason chan
31,009 PointsSay I have a module called 'custom_events' and it needs to create a custom form. The function I need to make where I create all the form fields should be called
I need example on functions too. I'm like? I know how to script, but the language of question has me a bit lost.
Micah Courey
20,168 PointsMicah Courey
20,168 PointsWhich question in the quiz were you confused by?