1

I build a pdf-form with the package hyperref. I am using this form to calcualate two sums and the difference between this sums. Therefore I am using the package insdljs. Everything works fine as long as I am using number-expressions like 10.3 + 2.4 = 12.7. But this Form is supposed to be used by Germans who type number like 10,3 + 2,4 = ???. My document isn't able to accept this arguments. I already tried to change the output-format directly in the \textfield, using AFNumber_Format like this:

\begin{document}
\begin{Form}
\begin{tabularx}{\linewidth}{|l l l l|}
Ausgaben1: 
& 
\TextField[name=a1, bordercolor=yellow!30,color=blue, width=3.7cm, 
onblur={berechne(),format={AFNumber_Format(2,2,1,0,"",true);}}]{} 
&   
Eigenmittel1:  
& 
\TextField[name=e1, bordercolor=yellow!30,color=blue, width=3.7cm,
 onblur={berechne()}, format={AFNumber_Format(2,2,1,0,"",true);}]{}
{...} \\
\end{tabularx}

Then I also tried to change the format at the same environment, where I defined my calculations:

 \begin{insDLJS}[]{JSDateiname}{irgendeinTitel}
function initialisiereFelder() {       
  AllFields = newarray("a1","a2","a3","a4","a6","a5","e1",e2","e3","e4",
                   "Ergebnis1","Ergebnis2","Endergebnis","Zuschuss");    
    for (i=0; i<AllFields.length; i++) {
        this.getField(AllFields[i]).AFNumber_Format(2,1,2,0,"",true);
    }   
 }
 \end{insDLJS}

I don't understand, how I can use AFNumber_Format correctly. Why this command didn't work in my document? Maybe there is a easier way the solve my problem. Is it possible the change the language of the textfields to German. I am already using \usepackage[ngerman]{babel}. So the whoole document is in German, but the textfields , where I can type comment have a English spelling verification.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.