Thanks for that - I'll use your option 1 - I did think of that but it didn't 
seem particularly elegant, but it's simple and it works. And I can't get option 
2 to work

> It worked for me in Chrome, but didn't test in other browsers.
> 
> Two other options are:
> 
> 1) Put your cfinput in an if/else with/without that attributes.
> 
> 2) Pass all the attributes in as an attributeCollection [1]
> <cfset inputArgs = {id="addr", name="addr", type="text", value="xxxx" 
> ) />
> <cfif NOT form_editable>
> <cfset structInsert(inputArgs, "disabled", "disabled", true/>
> </cfif>
> 
> <cfinput argumentCollection=inputArgs/>
> 
> [1] 
> http://help.adobe.com/en_US/ColdFusion/9.
> 0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7f51.html
> 
> On 2/2/12 2:28 AM, Seamus Campbell wrote:
> > Thanks - but no, the form only needs to see the word disabled ie 
> disabled = "false" still disables the form (same with readonly)
> >
> >> It seems you should be able to do:
> >>
> >> <cfinput id="addr" name="addr" type="text" value="xxxx"
> >> disabled="#form_editable#"/>
> >>
> >> On 2/2/12 12:54 AM, Seamus Campbell wrote:
> > 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349763
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to