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.
Hello,
We have cabins that accommodate from 2 to 10 persons, so I wonder if the search widget can be configured to look out for up to 10 occupants?
Or what can I (no coder) possibly do?
Warm regards from sunny México!
: )
Pepe
Comments
Comment #1
larowlanHi Pepe
Unfortunately as it stands the only solution is via a custom module.
You can create a new module and add something like so (untested)
Happy to take a patch that adds this as a config option.
LR
Comment #2
PepeMty CreditAttribution: PepeMty commentedThank you, Lee!
I'll give it a try next Friday 'cause I don't have any spare time these two days ; )
Besides, I see you marked this issue as a release blocker. I feel kind of honored just to think this might get into uc_hotel core : )
Best regards!
: )
Pepe
Comment #3
PepeMty CreditAttribution: PepeMty commentedLee et al,
Sorry to bother you again, but after using the module builder to make the module, and installing it, I received this error message:
Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING in /home/myserver/mysite.com/sites/all/modules/10ocupantes/10ocupantes.module on line 12
Here is my module code:
I know it's different from what you suggested, but I used that one too and also have an error message, so I used what the builder module gave me plus
$form['search']['adults']['#options'] = drupal_map_assoc(range(0,10));
Any suggestions?
Best regards!
: )
Pepe
Comment #4
larowlanHi Pepe
Function names (and hence module names) can't start with a number.
LR
Comment #5
larowlanAlso you need to change the FORM_ID in the function name to hotel_booking_search_form
Comment #6
PepeMty CreditAttribution: PepeMty commentedLee,
Both posts 4 + 5 did the trick!
I thank you again : )
Warmest regards from way too sunny (and hot) México!
: )
Pepe