Jump to content

Recommended Posts

Posted

Totoff there is version 0.2.3b, see the FormBuilder board (let me know if you don't see it). I'm planning to release 0.2.5, which is based on 0.2.3b, once PW 2.5 is out. 

Posted

Hi Ryan,

I found this post pointing to 0.2.3b. Is it that what you mean?

However, I did install in 2.5 in the meantime and it works fine.

As ever, many thanks for your constant and kind support!

Posted

Hi Ryan

I downloaded the FormBuilder module yesterday and it is brilliant. Thanks for making this.

I'm having a little problem though. When I tick the "Send an email to administrator(s)" checkbox and drop in an email address, that email address doesn't receive a copy of emails submitted through the form. I've tried a few different emails with no luck.

Any ideas on how I might fix this? Ideally, I'd like my client to receive an email when someone tries to contact them using the contact form I've created.

Thanks

  • 5 years later...
Posted
On 2/24/2020 at 11:28 AM, rooofl said:

Hello,

I need users to add new entries to a page reference field, just like a “Create New” action. Is that possible in a form?

I solved that with a hook in `site/ready.php`

<?php
$forms->addHookBefore('FormBuilderProcessor::processInputDone', function($e) {
  $form = $e->arguments(0);
  if($form->name == 'new_submission') {
    $pageTitle = "test";
    $toFind = wire(pages)->find("title=$pageTitle");
    if (count($toFind) == 0) {
      $page = new Page();
      $page->parent = "/config/designer/";
      $page->template = "designer";
      $page->title = wire(sanitizer)->text($pageTitle);
      $page->save();
    }
  }
});
?>

 

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
  • Recently Browsing   0 members

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