If you don't care about the visual cue of it being required, it is
fairly easy. This code will require name if you click the checkbox.
<cfform format="flash" onSubmit="if(moo.selected && zoo.text == '') {
alert('You must enter your name, bozo','Error'); return false;}">
<cfinput type="checkbox" name="moo" label="I Agree" required="false"
value="1">
<cfinput type="text" name="zoo" required="false" label="Name">
<cfinput type="submit" name="submit" value="Push the button">
</cfform>
On Mon, 7 Mar 2005 10:52:16 -0500, David Brown <[EMAIL PROTECTED]> wrote:
> From what I can tell the required attribute can not be changed with
> actionscripting. Has any tried placing a variable in the value of required
> and with actionscripting in an onchange event update the value of that
> variable?
>
> I know I can't use required="#variable#" since that is a coldfusion variable.
> Would it be required="var a" ?
>
> Hope this make since.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197768
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54