Search the web
Sign In
New User? Sign Up
ydn-flash · Yahoo! Flash Developer Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
How to Retrieve field data using FormDataManager without validation   Topic List   < Prev Topic  |  Next Topic >
Reply | Forward  | 
Re: How to Retrieve field data using FormDataManager without validation action

Thanks for answering my post. I have not been able to test the solution you
suggested because I am not sure how to fire the submit handler without the user
actually doing so. Do you know of a way I can trigger that event from code?
Thanks for helping me out with this, it has been consuming my development time.

Shade

--- In ydn-flash@yahoogroups.com, kayoh@... wrote:
>
>
> Hi Shade,
>
> You can collect unvalidated data by loop through
FormDataManagerEvent.collectedData.
>
> For instance, in sample movie of SimpleFormToBegin.as , try to add those line
below in handlerDataCollectionFail function.
>
>
> private function handlerDataCollectionFail(e : FormDataManagerEvent) : void {
> // Let's collect error messages is in the failedData.
> var resultTxt : String = "### Errors in your form ### \n\n";
> for (var i:String in FormDataManager.failedData) {
> resultTxt += i + " : " + FormDataManager.failedData[i] + "
\n";
> }
>
> /* ADD three lines below */
>
> for (var ii:String in e.collectedData) {
> resultTxt += ii + " >>> " + e.collectedData[ii] + " \n";
> }
>
> // And show it in a textArea.
> if(!collectedDataOutput) this.addChild(addCollectedDataOutput());
> collectedDataOutput.text = resultTxt;
> }
>
>
>
> "FormDataManagerEvent" has public var "collectedData" which is stored
un-required fields' data during the validation process.
>
> Hope this helps.
>
> Kay.
>
> --- In ydn-flash@yahoogroups.com, "shadetyler" <shadetyler@> wrote:
> >
> > Hi everyone,
> >
> > I am trying to build a contact form where users can enter information
> > and it will then collect and send that information to me. In the
> > situation where someone decides they don't want to complete the form and
> > decide to cancel, I would like to have that information collected and
> > sent to me as well. I am trying to loop through the data in the static
> > class FormDataManager and it will not return any values from the
> > collectedData attribute unless the validation and form submittion have
> > been executed. I know I could keep my own references to the form objects
> > and call them directly, but the contact form is generated dynamically
> > making this approach not ideal.
> >
> > Thanks for any suggestions.
> >
> > Shade
> >
>





Thu Nov 5, 2009 7:13 pm

shadetyler
Offline Offline
Send Email Send Email

Forward
 | 
Expand Messages Author Sort by Date

Hi everyone, I am trying to build a contact form where users can enter information and it will then collect and send that information to me. In the situation...
shadetyler
Offline Send Email
Nov 3, 2009
8:17 pm

Hi Shade, You can collect unvalidated data by loop through FormDataManagerEvent.collectedData. For instance, in sample movie of SimpleFormToBegin.as , try to...
kayoh@...
kayoh@ymail.com
Offline Send Email
Nov 5, 2009
3:57 am

Thanks for answering my post. I have not been able to test the solution you suggested because I am not sure how to fire the submit handler without the user...
shadetyler
Offline Send Email
Nov 5, 2009
7:16 pm

"collectData" function in "FormDataManager" is public. So, you can call directly formDataManager.collectData(). Let's say you have registed trigger like... ...
kayoh@...
kayoh@ymail.com
Offline Send Email
Nov 5, 2009
8:11 pm

Wow, I completely missed that function in the documentation. The only other thing would be to collect data from fields even though they haven't validated. For...
shadetyler
Offline Send Email
Nov 5, 2009
9:03 pm

At the very end of FormDataManager.as, there is line of FormDataManager.failedData[id] = curErrStr; in "validateAndStore" function. You can modify it as below...
kayoh@...
kayoh@ymail.com
Offline Send Email
Nov 5, 2009
10:47 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help