Just wondering why the radio rendering of a list type is always required:
/core/packages/formtools/list.cfc#L238:
<input type="radio" name="#arguments.fieldname#" class="required #arguments.stMetadata.ftClass#" value="#optionValue#"<cfif listFindNoCase(arguments.stMetadata.value, optionValue)> checked="checked"</cfif> />
I’m aiming for an optional Yes/No field - i.e. we want to know if they’ve answered yes, no or not at all.
Would the fix be to include this:
<cfif structKeyExists(arguments.stMetadata, "ftValidation") AND listFindNoCase(arguments.stMetadata.ftValidation, "required") >
<cfset arguments.stMetadata.ftClass = ListPrepend("required", arguments.stMetadata.ftClass, " ") >
</cfif>
and then just use arguments.stMetadata.ftClass
as the class?
Cheers