Jump to content

FormBuilder - dynamically set administrator email


sandimilohanic
 Share

Recommended Posts

Hi All, I'm using FormBuilder Pro. Can I set an administrator email to be set dynamically from a page field? 

I want to set up an email on a page, and if there is, take it as an administrator email.

I tried to add a hook, but it's not working...

Thanks all.

$forms->addHookBefore('FormBuilderProcessor::renderReady', function($e) {
    $processor = $e->object; // FormBuilderProcessor instance
    $form = $e->arguments(0); // retrieve argument by number (zero based)
    $form = $e->arguments('form'); // OR retrieve argument by name
    $processor->emailTo = $e->wire('page')->admin_email;
  });
Link to comment
Share on other sites

I'm sorry. Since you said you were a user of Form Builder, which is a licensed product, I assumed you had access to the forum section for users of registered products. In order to see the post I published here, you must register with your purchased copy of Form Builder to access this section: https://processwire.com/talk/forum/27-vip-support/ you can manage your purchases here: https://processwire.com/talk/clients/purchases/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...