Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi! I try hide the widget for select "rooms" In the "Availability Search" block, Is possible this?
Comment | File | Size | Author |
---|---|---|---|
#6 | hide_number_of_rooms.zip | 1.38 KB | Manuel P.V. |
Comments
Comment #1
scalas89 CreditAttribution: scalas89 commentedHi @Manuel P.V. - you're referring to the "Select Type"?
Comment #2
Manuel P.V. CreditAttribution: Manuel P.V. commentedNo, I refer to the widget where is selected the number of "rooms" for "search availability".
Arrival Date - Departure Date - Rooms - Adults - Children - Unit Type - Search fo Availability.
Comment #3
scalas89 CreditAttribution: scalas89 commentedI think you can use the hook_form_FORM_ID_alter() and hide the element.
This should hide the element
Comment #4
Manuel P.V. CreditAttribution: Manuel P.V. commentedExcuse me. I understand that this code:
I have to introduce it literaly it in the "rooms_booking_manager.module" file. (...) Before the line "rooms_booking_availability_search_form_builder"? in the line 781 of the file.
And open and close the php isn't necessary.
This part of the line "your_module_form_(...)" confuses me.
Is it right?
Comment #5
scalas89 CreditAttribution: scalas89 commentedNo - If you have a custom module you can use the code of my comment (#3) replacing "your_module" with your custom module name.
Feel free to send me a pv fon any help :)
Regards
Comment #6
Manuel P.V. CreditAttribution: Manuel P.V. commentedOk @scalas89 Thank you very much! Work Perfectly :) I didn't know how to create a custom module, and I was researching ... it's curious that the hooks. Learning...
This is the hide_number_of_rooms micro-module (add-on) jajaj attached in.zip file! Thank you man.
Comment #7
ronald_istos CreditAttribution: ronald_istos commentedComment #8
WtheM CreditAttribution: WtheM commentedI think it shall be avaliable in rooms configuration.