Skip to main content
danielh43624232
Participating Frequently
January 22, 2025
Question

Formular "Wenn Feld aktiviert, dann wird ein andres Fled Pflichtfeld"

  • January 22, 2025
  • 1 reply
  • 800 views

Hallo, ich habe ein Problem,

 

ich habe ein Kontrollkästchen und ein Eingabefeld "Textfeld".

Ich möchte nun, wenn das Kontrollkästchen aktiviert wird, das nun das Textfeld daneben ein Pflichfeld wird.

wird es wieder daktiviert, dann nicht mehr.

Hat hier jemand eine Lösung?

 

Vielen Dank!

1 reply

PDF Automation Station
Community Expert
Community Expert
January 22, 2025

Enter the following mouse up action script in the check box:

if(event.target.value!="Off")

{this.getField("Text field").required=true}

else

{this.getField("Text field").required=false}

danielh43624232
Participating Frequently
January 22, 2025

Thank you very much, that worked really well.

Now I have another question, I have a lot of selection fields on one page. Can I say that only a maximum of 5 can be selected?

try67
Community Expert
Community Expert
January 22, 2025

No, but you can display an error message if more than 5 are selected, and prevent the file from being submitted while that is still the case. Both things require a script, of course.