Question
Dynamically disable cfinput
I want to disable a radio button based on a variable
isUserCreditApproved. The attached code is what i came up with
however CF chokes with
Invalid CFML construct found on line 9 at column 84.
ColdFusion was looking at the following text:
#
The CFML compiler was processing:
* A cfinput tag beginning on line 9, column 33.
The error occurred in D:\path\to\file\testcredit.cfm: line 9
7 : <tr><td>
8 : <cfform name="myform" method="post">
9 : <label><cfinput type="radio" name="paytype" value="billme" #IIF(not isUserCreditApproved, DE('disabled="disabled"'), DE(''))#>Bill Me</label><br>
10 : </cfform>
11 : </td></tr>
How can I get the functionality that i want? Or, Is what i'm trying even possible?
Invalid CFML construct found on line 9 at column 84.
ColdFusion was looking at the following text:
#
The CFML compiler was processing:
* A cfinput tag beginning on line 9, column 33.
The error occurred in D:\path\to\file\testcredit.cfm: line 9
7 : <tr><td>
8 : <cfform name="myform" method="post">
9 : <label><cfinput type="radio" name="paytype" value="billme" #IIF(not isUserCreditApproved, DE('disabled="disabled"'), DE(''))#>Bill Me</label><br>
10 : </cfform>
11 : </td></tr>
How can I get the functionality that i want? Or, Is what i'm trying even possible?
