I want to send email with the action of the link in the pdf form.
I added action=mailto:... into the PushButton, after onclick but I am not sure if you should bind mailto on the onclick somehow directly.
Code
% https://tex.stackexchange.com/a/388186/13173
% https://tex.stackexchange.com/a/386853/13173
\documentclass{article}
\RequirePackage{hyperref}
\begin{document}
\begin{Form}
\TextField[charsize={10pt},multiline=true,height={5mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
\PushButton[onclick={this.exportAsText()},action=mailto:leo <leo.test@mailinator.com>]{Submit}
\end{Form}
\end{document}
Output in compiling with pdflatex
! Package kvsetkeys Error: Undefined key `action'.
Testing diabonas' proposal
Diabonas' example code works, but controlling the email content better next step: send the file itself and textual content in the email.
Works in Beamer too with the following example
Beamer code example
\documentclass{beamer}
\usepackage[english]{babel}
\usetheme{Berkeley}
\usepackage{microtype}% more flexibility for narrow columns
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{adjustbox}
% https://tex.stackexchange.com/a/395124/13173
\RequirePackage{hyperref}
\usepackage{eforms}
\begin{document}
\begin{frame}
\frametitle{Lorem}
Testing 1.
\end{frame}
\begin{frame}
% Show reproduction of the answers in the next sheet.
Send to the address:
\begin{Form}
\TextField[charsize={10pt},multiline=true,height={5mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
\PushButton[onclick={this.submitForm("mailto:leo <leo.test@mailinator.com>"); this.exportAsText();}]{Submit}
\end{Form}
\end{frame}
\end{document}
Output: activation of email client
OS: Debian 9.1
TeXLive: 2017
Email client: Thunderbird
PDF viewer: Adobe Reader (acroread in Linux)
actionis aFormenvironment option, but not a\PushButtonoption – Oct 08 '17 at 08:44