Download & Extend

Add value to 'Arrival date' textfield

Project:Availability Calendars
Version:7.x-3.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello

My Arrival date textfield is set to 'From arrival during duration'.

I would like to find out how to add value to 'Arrival date' textfield, so, 'Arrival date' text will be displayed in the textfield.

The reason for this is that my design for the search block does not have labels, not required if you can add or update a value for form elements, as per above.

See attached for a visual.

Matt

AttachmentSize
exclusive-nd-search.jpg49.03 KB

Comments

#1

sorry, 2nd para above should say '...how to add (a) value to (the) Arrival date textfield...'

#2

When I developed the Views filter handler for availability I did not understand why there is so few validation in the default supplied filters (numeric and date which I originally extended). With this example, I start to understand why one would not validate values entered in the Views UI for exposed filters. But still, if the user leaves this value untouched, it will lead to a validation error when (s)he presses "Search Availability". (The date filter does not give a validation error but happily converts it to 0 and builds a query with that as value...)

For another site where the client also wanted in-field labels, I used the jQuery defaultvalue plugin. It is easy to use and works like a charm (but this was not a Drupal site). Bonus is that the default values are not sent to the server on submit. Thus no validation errors, no people with "phone" as telephone number...

I think that this is not something this module should provide, but that you should build yourself using the mentioned jQuery plugin. Might be a good candidate for a contrib module ...

nobody click here