Custom Wizard: PM access and send copy of submission for guest users?

Hey guys

we are currently building a contact form for b2b inquiries in our forum. We enabled guest submissions As actions, we set:

  1. send message to my account
  2. forward to thank you page

With this setup, the system user sends the PM

Question 1: Is there any way for the unregistered guest user to access the conversation without an account
Question 2: is there any way to send the guest user a copy of his submission to his email address?

@jrgong After thinking this over a bit, I think the way to make your desired use case possible would be to do the following. I’ve marked what is strictly “optional” below.

  1. Add a “Email” field (optional). Same as the “text” field, however it validates the presence of an email address and gives immediate feedback to the user. You could just use the text field as is for this, however a decent subset of users will not enter their email address correctly.

  2. Update the Send Message action to allow for

    1. Setting the Sender of the message (optional). Currently if there is no user (i.e. a guest wizard) the Discourse.system_user (i.e. “system”) is the sender.

    2. Supporting email addresses mapped from wizard fields as the recipient. Currently this causes an error.

That would allow the following

  1. Guest fills out wizard, including a field that contains their email address.
  2. Wizard is set to “Send Message” from a the “Sender” user to email address submitted in wizard.

I tried exactly that and can confirm! :slight_smile: Does that mean that it’s a bug or simply a setting that was never intended to be used like that?

It was never intended to be used like that. But it’s borderline. Let me have a closer look at this today.

@jrgong After looking at this more closely, supporting this would indeed be a new feature rather than a bug of the existing functionality.

I came to that conclusion as:

  1. It is not a case anticipated by the current functionality.
  2. It would require further logic in the send_message action.
  3. It would require additional tests.

In that vein, I’ve added a fix so that the attempt to use the custom wizard in this way won’t throw an error to the user, however it will still fail silently.

1 Like

is there any “best practice” contact form wizard available for download that I could try and use?

Not yet, it’s not a use case that has been significantly anticipated. That said, we may be implementing this ourselves in the near future (i.e. next few weeks), so your timing is apposite. I’ll let you know on that front.

1 Like