I am trying to create a fillable pdf form. I am using the hyperref
package.
I am able to create fillable text fields, however, when I want to create a fillable text field inside a table, it does not work. The code is attached.
Please let me know how this can be solved.
Edit: It works fine with pdfLatex, however, I need to get it working with XeLateX
\documentclass[a4paper,8pt]{article}
\usepackage[legalpaper,left=4pt,right=14pt,top=13pt,bottom=14pt]{geometry}
\usepackage{hyperref}
\usepackage{multirow}
\usepackage{setspace}
\begin{document}
%set font type
\fontfamily{lmss}\selectfont
\singlespacing
%begin form environment
\begin{Form}[action=mailto:forms@stackexchange.invalid?subject={The submitted form},method=post]
\begin{center}
\noindent\TextField[name=compay,width=5cm]{}\\[0mm]
\LARGE{Appraisal Report}
\end{center}
\begin{flushright}
\TextField[name=file_no,width=5cm]{File No. } \\[0mm]
\end{flushright}
\begin{table}[h]
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{lllll}
Test Table & \multicolumn{4}{l}{} \\
a & a & f & f & f \\
d & s & \TextField[name=file_no,width=5cm]{File No: } & a s & s \\
& & & &
\end{tabular}
\end{table}
\end{Form}
\end{document}
Best Answer
I can confirm that it does not work in XeLaTex
It will work in a p column. See MWE below. Likewise in your MWE
Curiously it is not simply a case of too little space in l column - even if column is forced easily wide enough.