all groups > coldfusion flash integration > august 2005 >
You're in the

coldfusion flash integration

group:

disable required field in real time?


disable required field in real time? rwhaun
8/19/2005 12:00:00 AM
coldfusion flash integration:
Is there a way to disable a <cfinput required /> field with actionscript?

Here's my scenario - I have a flash form with several tabs. Each tab page has
various form fields and a submit button. If the user picks tab #3 and fills
out its form fields then hits that submit button, they get an alert saying that
the required fields from tabs #1 and #2 need to be filled out. I don't care
about those if the user is submitting tab #3.

Can I write actionscript that will cancel the "required" attributes of the tab
#1 and #2 fields when tab #3's submit button is hit?

One workaround would be to not use the "required" attribute at all and write
my own AS validation. However, I like the built-in functionality of the red
highlights for required fields and the email, and url validation. Does anyone
have any other suggestions as to how I could do this?
Re: disable required field in real time? rwhaun
8/22/2005 12:00:00 AM
The geniuses at ASfusion.com have posted the solution at http://www.asfusion.com/blog/entry/enabling-and-disabling-validation-in

AddThis Social Bookmark Button