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 instance if they enter in joe@email and it fails to validate and is not
collected as far as I can tell. Do you know of any way I can still get the
field's value? Either way I really appreciate all your help. Thanks.
Shade
--- In ydn-flash@yahoogroups.com, kayoh@... wrote:
>
> "collectData" function in "FormDataManager" is public.
> So, you can call directly formDataManager.collectData().
>
> Let's say you have registed trigger like...
> formDataManager.addTrigger(submitButton, handlerDataCollectionSuccess,
handlerDataCollectionFail);
>
> and your formDataManager.collectData() will fire
> "handlerDataCollectionSuccess" or "handlerDataCollectionFail" functions,
>
> Hope this helps somewhat way.
>
> K.
>
> --- In ydn-flash@yahoogroups.com, "shadetyler" <shadetyler@> wrote:
> >
> > 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
> > > >
> > >
> >
>