Skip to main content
September 23, 2006
Question

Dynamic Checkbox and Radio Group

  • September 23, 2006
  • 2 replies
  • 413 views
With the attached code I get the following error:

Invalid token 'c' found on line 256 at column 98.
The CFML compiler was processing:

a cfinput tag beginning on line 256, column 34.
    This topic has been closed for replies.

    2 replies

    Inspiring
    September 23, 2006
    You can't put any cf tag inside another one. In other words you can't do this

    <cfinput <cfif>etc </cfif>>

    But you can put cf tags inside html tags, like this:
    <input <cfif>etc </cfif>>
    Inspiring
    September 23, 2006
    i think CF form elements (like <cfinput>) do not like <cfif> loops inside of them... i remember i have tried it before and it didn't work... regular html form elements (i.e. <input>) are ok with it.
    so i guess you will have to put your <cfinput> inside a <cfif>, like this:
    (also, no need to use # inside cfif statements)

    <cfif getLead.Request_for_Quote EQ 1>
    <cfinput type="checkbox" name="Request_for_Quote" tabindex="22" checked="true"/>
    <cfelse>
    <cfinput type="checkbox" name="Request_for_Quote" tabindex="22" checked="true"/>
    </cfif>