What is going wrong?
Is Formulate on Umbraco 8 only possible with Plain-Javascript?
On an other site with Umbraco 7, Formulate and emailing is working great.
Is Formulate on Umbraco 8 only possible with Plain-Javascript?
Unsure what you mean. As opposed to the Angular template? Both should work, I would think (though I recommend the plain JavaScript template).
What is going wrong?
Have you tried setting up a "Store Data" handler (and disable or remove the email handler)? If that works, I would imagine there is some issue with the SMTP configuration in the web.config, or perhaps with the setup in the email handler (e.g., the sender email address).
Can you share a screenshot of the email handler?
You can also test by having the email be stored on the file system with this configuration in your web.config:
I've tested with "Store Data". That's going fine.
I also changed the mailsettings with the one for store on the file system, but thats also not working. (directory c:\temp\email exists)
My contact.cshtml is:
section class="resume-section summary-section mb-5">
<h2 class="resume-section-title text-uppercase font-weight-bold pb-3 mb-3">@Model.ContentTitle</h2>
<div class="resume-section-content">
<p class="mb-0">@Model.Value("bodyText")</p>
<div class="formulate-wrapper">
@* Render the form. *@
@Html.Action("Render", "FormulateRendering", new { form = Model.FormulateForm })
</div>
@* The JavaScript file for Formulate's plain JavaScript template. *@
<script src="/App_Plugins/formulate/responsive.plain-javascript.min.js" async></script>
@* This is your JavaScript that handles events dispatched by Formulate. *@
<script src="/scripts/custom-formulate-script.js" async></script>
</div>
The form is rendering fine and when I click submit, I'm getting the message the form is submitted. But nothing in the c:\temp\email folder.
Yes, the plain JavaScript template works with the SMTP handler.
I just tested the SMTP handler with Umbraco 8 using the plain JavaScript handler and an SMTP configuration as described above and it stored a file on the file system.
It might help if you shared a screenshot of your email handler. Here's a screenshot of mine:
You may also want to check your error log after you submit a form.
Can you make sure your email handler is enabled? It isn't shown in your screenshot, so I can't check. It's the little eyeball icon to the right of the handler. You can see it in my previous screenshot.
And you'll want to double check the error logs after you submit a form.
Another thing you can try is using a super simple form. Just a "Message" field and a "Submit" button. And configure the handler very simply (e.g., no need to "Include Specific Fields").
Problem solved!!!
And so simple. Why didn't we think about this before :).
It looks like when installing Formulate (in my case with "Manage Nuget packages for solution"), in the file FormulateConfiguration.json the setting 'Whitelist' is enabled by default. When setting this to false, form submit is working and putting a email file in the c:\temp\email folder.
It'll be included with the next release of Formulate.
So, what are the possible settings in:
I believe the file is installed with the possible settings. You can set either a domain or an email and that email or domain will be whitelisted.
What is the best way to redirect to a custom page after the form is submitted?
Listen for the JavaScript event ("formulate form: submit: success") and then redirect (e.g., by setting window.location to whatever URL you want). That's assuming the plain JavaScript template. I imagine there is something similar for the Angular template, but I can't remember offhand.
I usually never do that though. Instead, I just show a thank you message in place of the form (i.e., without navigating to another page).
Formulate email handler not working on 3.1
Hi,
I installed Formulate 3.1 on an Umbraco 8.2 website. With some help from https://our.umbraco.com/packages/backoffice-extensions/formulate/formulate-questions/98662-form-rendering-formulate-in-3plus I succeeded in rendering the form. Submitting works great, but an email is not sent. I've checked the mailsettings in web.config and tested with an online smtp-test to see if these settings are working. This works fine.
What is going wrong? Is Formulate on Umbraco 8 only possible with Plain-Javascript? On an other site with Umbraco 7, Formulate and emailing is working great.
Who can help me?
Regards,
Onno Sloof
Sorry for the delay.
Unsure what you mean. As opposed to the Angular template? Both should work, I would think (though I recommend the plain JavaScript template).
Have you tried setting up a "Store Data" handler (and disable or remove the email handler)? If that works, I would imagine there is some issue with the SMTP configuration in the web.config, or perhaps with the setup in the email handler (e.g., the sender email address).
Can you share a screenshot of the email handler?
You can also test by having the email be stored on the file system with this configuration in your web.config:
You will need to make sure the directory exists before trying that.
Hi Nicholas,
Thanks for you input. On http://www.formulate.rocks/plain-javascript/render-form I can read "Also, this applies to Umbraco 8. For the Umbraco 7 version". So, is for Umbraco 8 only the plain-javascript method possible? In https://our.umbraco.com/packages/backoffice-extensions/formulate/formulate-questions/98662-form-rendering-formulate-in-3plus Daniel says: "The instructions from your site http://www.formulate.rocks/render-form no longer seem valid. Namely, 'Rendering' is no longer present in the 'formulate.api' namespace".
I've tested with "Store Data". That's going fine. I also changed the mailsettings with the one for store on the file system, but thats also not working. (directory c:\temp\email exists)
My contact.cshtml is:
The form is rendering fine and when I click submit, I'm getting the message the form is submitted. But nothing in the c:\temp\email folder.
I think these may answer some of your questions:
It might help if you shared a screenshot of your email handler. Here's a screenshot of mine:
You may also want to check your error log after you submit a form.
Hi Nicholas,
Tried to sent a User Invitation with mailsettings as below, that works fine. The email file is in the c:\temp\email folder.
My mailhandler is (changed the mail domains for now):
But when sending the form, no mail in the temp\email folder.
If there is something more you like to have, I can sent it to you.
Onno
Can you make sure your email handler is enabled? It isn't shown in your screenshot, so I can't check. It's the little eyeball icon to the right of the handler. You can see it in my previous screenshot.
And you'll want to double check the error logs after you submit a form.
Hi Nicholas,
The handler is enabled. See screenshot:
Also, there are no errors after submitting the form:
I will try to test with a very simpel form.
Another thing you can try is using a super simple form. Just a "Message" field and a "Submit" button. And configure the handler very simply (e.g., no need to "Include Specific Fields").
Hi Nicholas, Just tried with a very simpel test form.:
Form was submitted very quick, but nothing in the folder.
Hi Nicholas,
Problem solved!!! And so simple. Why didn't we think about this before :).
It looks like when installing Formulate (in my case with "Manage Nuget packages for solution"), in the file FormulateConfiguration.json the setting 'Whitelist' is enabled by default. When setting this to false, form submit is working and putting a email file in the c:\temp\email folder.
So, what are the possible settings in:
And another, totaly different, question: What is the best way to redirect to a custom page after the form is submitted?
Thanks,
Onno
I'm glad you were able to get it working. I've just made a change so the default will be to skip the whitelisting: https://github.com/rhythmagency/formulate/issues/162
It'll be included with the next release of Formulate.
I believe the file is installed with the possible settings. You can set either a domain or an email and that email or domain will be whitelisted.
Listen for the JavaScript event ("formulate form: submit: success") and then redirect (e.g., by setting window.location to whatever URL you want). That's assuming the plain JavaScript template. I imagine there is something similar for the Angular template, but I can't remember offhand.
I usually never do that though. Instead, I just show a thank you message in place of the form (i.e., without navigating to another page).
is working on a reply...