coldfusion - selectTag() is not prepending to label in CFWheels -
in cfwheels settings.cfm
, have following code:
set(functionname="selecttag", labelplacement="before", prependtolabel="<div class='field field-select'>", append="</div>", appendtolabel="", class="field-select"); set(functionname="select", labelplacement="before", prependtolabel="<div class='field field-select'>", append="</div>", appendtolabel="", class="field-select");
in form view have following code:
<cfoutput>#selecttag(name="pin[typeid]", options=types, objectname="pin", property="typeid")#</cfoutput>
however, in generated output, html within prependtolabel
attribute not outputted. append
attribute is working though; of course breaks formatting / layout of page.
output html
<select class="field-select" id="pin-typeid" name="pin[typeid]"><option value="1">wanted</option><option value="2">available</option></select></div>
is bug, or doing incorrectly here?
thanks, michael.
answer!
in view, needed add label attribute, had forgotten do.
label=""
so, view code should have been:
<cfoutput>#selecttag( label="type of pin", name="pin[typeid]", options=types, objectname="pin", property="typeid" )#</cfoutput>
the generated html works / outputs expected.
Comments
Post a Comment