Search code examples
facebookvalidationasynchronousemail-validationuser-registration

Email async validation with facebook registration form


As facebook says

For privacy reasons, the input to your function will be only the custom fields you requested, on blur or submit.

Indeed email is not custom field but when user clicks on "x" (cross) to fill details manually then still form.email remain undefined ?

Is this a facebook bug , is there any fix/ solution for it ?


Solution

  • Well I have found a fix for it by using 'view' property

    In fields list I added

    fields="[
     {'name':'email','view':'prefilled'},
     {'name':'xemail','view': 'not_prefilled','description':'Email Address:','type':'text'}]";
    

    Now email is used with fb and xemail is used without fb and my async validators which are needed in case of without fb uses form.xemail.