Remove id attribute on checkbox/radio elements in list formtool

Description

Reported in the forums: http://discourse.farcrycore.org/t/list-cfc-creates-invalid-html-code/382

Hi,

There is a problem with the code that /packages/formtools/list.cfc produces in the edit function (starting line 158).

This applies to all list types but for example if you create a list of checkboxes, the code at line 212 results in every checkbox having the same ID.

<input type="checkbox" name="#arguments.fieldname#" class="checkboxInput #IIF(listLen(lData) eq tmpCount ,DE(" #arguments.stMetadata.ftClass#"),DE(""))#" id="#arguments.fieldname#" value="#optionValue#"<cfif listFindNoCase(arguments.stMetadata.value, optionValue)> checked="checked"</cfif> />
This creates invalid HTML code.

Regards
Mark

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 22, 2015 at 5:46 AM
Updated April 22, 2015 at 6:10 AM
Resolved April 22, 2015 at 6:10 AM