I am using eforms to create pdf where digital signature can be applied. Each document may have more than one digital signature field, ie so the document can be passed from person to person.
There is an added complexity here in the sense that depending on the parameters parsed to the custom command, \mySigField{...}, the username and title fields are either editable or not. In other words, the 4th and 5th argument represents the name and position respectively. If those input arguments are empty, an editable field is created, if they contain something, that something is printed and no editable field is created.
My Question is, in the event that there is at least one editable related field, how can I lock that field or fields once the particular user has signed.
The following sample output:

is produced with the following code:
\documentclass{article}
\usepackage{varwidth}
\usepackage{hyperref}
\usepackage[pdftex]{eforms}
\usepackage{xcolor}
\usepackage{xifthen}
\def\colFeat{blue!50!black} %Feature Color 1 for Main Color Theme.
\makeatletter
\def\eq@SigField{\centerWidget\eq@rectH
\if\autoCenter n\eqcenterWidget=0pt\fi
\leavevmode\hbox{\pdfstartlink user{\common@SigFieldCode}%
\lower\eqcenterWidget\Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}%
\endgroup
}
\makeatother
\newcommand{\mySigField}[5]{
\begin{varwidth}{#2}
\textcolor{\colFeat}{
\fcolorbox{black!5!white}{black!5!white}{\sigField{#1}{#2}{#3}}\\[1mm]
\rule{#2+3mm}{2pt}\\[2mm]
\begin{tabular}{rl}
\raggedleft Name: & \ifthenelse{\equal{#4}{}}{\TextField[name=name#1,width=6cm]{}}{#4}\\\\[-3mm]
\raggedleft Position: & \ifthenelse{\equal{#5}{}}{\TextField[name=pos#1,width=6cm]{}} {#5}
\end{tabular}
}
\end{varwidth}
}
\begin{document}
\def\WS{8cm}
\def\HS{2.5cm}
\section{Example of No Related Fields}
\mySigField{PERSONA}{\WS}{\HS}{John Smith}{Garbo}
\section{Example of One Related Field}
\mySigField{PERSONB}{\WS}{\HS}{Jane Doe}{}
\section{Example of Two Related Fields}
\mySigField{PERSONC}{\WS}{\HS}{}{}
\end{document}

