Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Survey Form on email

Anjali K
Tera Contributor

Hi Community,

I wrote a email script to create the survey feedback form below is the code

 

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {

    template.print("<html>");
    template.print("<label for='fname'>Tell us what you think about IT and what you want or need</label>");
    template.print("<br>");
    var ab = template.print("<input type='text' id='fname' value='fname'>");
    template.print("<br>");
    template.print("<br>");
    template.print('<a href="mailto:dev86112@service-now.com?subject=Submitted&body=Name:'+ab+'">');
    template.print("<button id='submit' type='submit' value='submit'>Submit</button>");
    template.print("</a>");
    template.print("</html>");
})(current, template, email, email_action, event);
 
AnjaliK_1-1701258018843.png

Above attached snip is the form I created, after submitting the form ,the details in the form should redirect to outlook as shown below

AnjaliK_2-1701258302262.png

 

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,

Anjali K

 

0 REPLIES 0