Survey Form on Email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 04:01 AM
Hi Community Team,
My requirement is , need to customise the survey feedback form in email notification ,once we click on submit it should redirect to outlook with those form details .
but I am getting values like undefined. for this wrote email script as well as HTML .
In notification body source code i have wrote HTML code .
Html Code:
<form id="survey-form" action="mailto:dev170026@service-now.com?SUBJECT=Re:${current.number} - Submitted&body=Name%3D${name}%0ARating%3D${dropdown}%0AHelpful%3D${radio}%0AComments%3D${comments}" method="post"><label id="name-label" for="name"> What is your name? <input required="" type="text" placeholder="Enter Your Name" /> </label> <label id="email-label" for="email"> What is your email address? <input id="email" required="" type="email" placeholder="Enter Your Email Address" /> </label> <label id="number-label" for="number"> What is your age? <input id="number" max="90" min="13" type="number" placeholder="Enter Your Age" /> </label> <label for="dropdown"><label for="dropdown"> Which option best describes your current role?<select id="dropdown">
<option>Student</option>
<option>Full Time Job</option>
<option>Part Time Job</option>
<option>Freelancer</option>
<option>Prefer Not to say</option>
</select></label></label>
<div class="form-group">
<p>Would you recommend IZT to a friend?</p>
<label> <input name="radio" type="radio" value="definitely" />Definitely </label> <br /><label> <input name="radio" type="radio" value="maybe" />Maybe </label> <br /><label> <input name="radio" type="radio" value="not-sure" />Not Sure </label></div>
<div class="form-group">
<p>What would you like to see improved? (Check all that apply)</p>
<label> <input type="checkbox" value="front-end" />Front-end projects </label> <br /><label> <input type="checkbox" value="backend" />Back-end projects </label> <br /><label> <input type="checkbox" value="Challenges" />Challenges </label></div>
<div class="form-group">
<p>Any comments or suggestions?</p>
<textarea cols="30" rows="4" placeholder="Enter Your Comments Here..."></textarea></div>
<label for="dropdown"><button id="requestsubmit" style="border-radius: 4px; border: 1px solid #4f52bd; padding: 6px 16px; color: #4f52bd;" type="submit" value="Submit">${mail_script:survey_emails_inbound} </button> </label></form>
Email script :
Then I can perform Email inbound action, but the value retrieved as undefined.
Help out to retrieve the correct data from the form to the outlook
Thanks,
Sushma