Episerver Forms - Default/locked "from" email field

Vote:
 

Hi!

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?

#197208
Sep 26, 2018 9:58
Vote:
 

Which one of these do you want to do:

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

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

#197282
Sep 27, 2018 14:56
nitinanand - 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.
nitinanand - 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?
regards
Nitin
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.
nitinanand - 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
Vote:
 
#197283
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.