Support

Home Forums Event Espresso Premium Auto Fill User Questions populates registration form with admini details

Auto Fill User Questions populates registration form with admini details

Posted: September 20, 2019 at 10:16 am

Viewing 2 reply threads


pcasoee

September 20, 2019 at 10:16 am

I have added the code snippets to auto populate the user system fields and question fields for a new registration when they have previously registered and are logged in – this works very well.
However, if an administrator has registered for an event at some previous time, and later edits the registration record for a different user (e.g. to change a incorrect name or phone number) then the user questions are populated with the administrators details.
Is there a way to modify the code snippet to only populate a new registration and not when editing a registration?
Thanks


Josh

  • Support Staff

September 20, 2019 at 10:56 am

Hi,

Yes, you can add an is_admin() check and return the unfiltered result. So for example if you’re using this snippet, you’ll add this at the start of the function:

if(is_admin()){
    return $input_args;
}


pcasoee

September 20, 2019 at 11:44 am

Thanks Josh,
Yes that is the snippet and I confirm that it resolves the issue.
Regards,
Cliff

Viewing 2 reply threads

The support post ‘Auto Fill User Questions populates registration form with admini details’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso