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?

danielh43624232
Participating Frequently
January 23, 2025

Thank you very much, I'll try that.

You've helped me a lot. If it doesn't work out, I'll be happy to get in touch again.


So I've integrated it now. Everything's working fine so far, if I activate more than 5 the message appears. But I can't deactivate any of the fields anymore, what am I missing in the script?