0

I have a form and there is a ChoiceMenu with three different possibilities. For two of them I have a further ChoiceMenu and it does not make sense to fill them out if the belonging option of the first ChoiceMenu is not selected. I tried to achieve this with the option readonly and some JavaScript code. But unfortunately nothing happens when I do this. Here is my code:

\documentclass[a4paper,10pt, hidelinks]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[margin=1.5cm]{geometry} 
\usepackage{tabularx}

\usepackage{makecell,
  tabularx}           
\setcellgapes{3pt}
\usepackage{enumitem}

\usepackage{hyperref} 


\begin{document}

\begin{Form}

\begin{itemize}
\item[{\ChoiceMenu[radio,name=netzanerkannt,radiosymbol=\ding{108}]{}{=nein}}]
Aktuell keine Anerkennung

\item[{\ChoiceMenu[radio,name=anerkannt,radiosymbol=\ding{108}]{}{=stufe0}}]
Stufe 0 seit dem Jahr \ChoiceMenu[name=stufe0anerkanntseit, readonly = {event.value = this.getField('anerkannt').value != 'stufe0'}, combo]{}{2013, 2014, 2015, 2016, 2017, 2018, 2019}

\item[{\ChoiceMenu[radio,name=anerkannt,radiosymbol=\ding{108}]{}{=stufe1}}]
Stufe 1 seit dem Jahr \ChoiceMenu[name=stufe1anerkanntseit, readonly = {event.value = this.getField('anerkannt').value != 'stufe1'}, combo]{}{2013, 2014, 2015, 2016, 2017, 2018, 2019}

\end{itemize}

\end{Form}

\end{document}

Does anybody have an idea to solve this? If you have another possibilities to achieve something like this it would be very nice, too.

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.