SaaS CMS has officially launched! Learn more now.

Episerver Forms - Default/locked "from" email field



Is it possible to set a default "from" email address for Epi forms and if so, how? I've read this comment and understand that it should be possible, but not exactly how.

Also, is it possible to lock this field and not make it editable?

Sep 26, 2018 9:58

Which one of these do you want to do:

  • Send form as email from an email address
  • Show readonly "from" email inside the form
Sep 27, 2018 12:08

I want this field to be predefined and not editable/hidden when selecting "send email" as the submit action on the form:

Sep 27, 2018 14:56
nitin anand - Oct 22, 2020 7:00
Did you find any working solution for this?
Mathias J - Oct 22, 2020 8:23
@nitinanand I ended up using custom JS to solve this issue.
nitin anand - Oct 22, 2020 8:25
js to autofill values in form above? Can you share the js code and where u place the script in project?
Mathias J - Oct 22, 2020 9:14
I added script to ClientResources/Scripts folder and added this row to the clientResources node in module.config:
add name="custom-epiformsscript" path="Scripts/epiFormsModification.js" resourceType="Script" sortIndex="1"

As for the code, yes, it's JS code to autofill the form. But I don't recommend this approach, I'd rather look into Goran's answer below for a more robust solution.
nitin anand - Oct 28, 2020 14:05
If i add logic for adding new email actor in creating event in episerver, i just get it triggered the first time. The next time, user needs to mention email manually. I am wondering if the JS solution is better which is why i am curious to have a look at the JS code if possible.
Or do you know if there is any way to add default value to this particular episerver's input element? thanks
Edited, Sep 27, 2018 14:59
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.