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?

PDF Automation Station
Community Expert
Community Expert
January 23, 2025

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?


It works for me.  I always test before I post a solution to something I've never done before.  You ask "what am I missing in the script" without posting the form or the script.  Please post the form and I'll take a look.