Skip to content

Miscellaneous

hourSelectTag()

hourSelectTag() — returns any

Builds and returns a string containing one select form control for the hours of the day based on the supplied name.

NameTypeRequiredDefaultDescription
namestringyesSee documentation for textFieldTag.
selectedstringyesThe hour that should be selected initially.
includeBlankanyyesfalseSee documentation for select.
labelstringyesSee documentation for textField.
labelPlacementstringyesaroundSee documentation for textField.
prependstringyesSee documentation for textField.
appendstringyesSee documentation for textField.
prependToLabelstringyesSee documentation for textField.
appendToLabelstringyesSee documentation for textField.
twelveHourbooleanyesfalseSee documentation for timeSelect.
<!--- This "Tag" version of the function accepts a `name` and `selected` instead of binding to a model object --->
<cfoutput>
    #hourSelectTag(name="hourOfMeeting", selected=params.hourOfMeeting)#
</cfoutput>

<!--- Show 12 hours instead of 24 --->
<cfoutput>
	#hourSelectTag(name="hourOfMeeting", selected=params.hourOfMeeting, twelveHour=true)#
</cfoutput>