Rundungsprobleme innerhalb einer Form

  • Dustin_willkommen
    Gefragt am 19. Dezember 2024 um 05:09

    Guten Tag,

    ich habe das Problem, dass ich eine Zahleneingabe beschränken bzw. korrigieren möchte.

    Ausgang: Es soll ein Betrag angegeben werden der beschreibt mit wie viel Euro man sich an unserer Genossenschaft beteiligen möchte.

    Einmalzahlung gesamt:

    Dieser Betrag muss zwingend durch 50 teilbar sein, da es immer nur in 50er Schritten Anteile zu erwerben sind.

    Bisherige Ideen:

    Schrittweise Erhöhung der Steps um 50. Problem dabei ist aber, dass die Eingabe nicht beschränkt ist und man ja auch nicht alles durchklicken will.

    Ich habe mit einer Formel versucht das Ergebnis zu runden. Im Formular gibt es aber nur die Funktion round und nicht rounddown. Damit könnte ich das Problem bereits im Formular angehen indem ich eine Hilfszelle mache wo ich mir den korrekten Wert bereche.

    Andere Idee war, dass ich mir in der Tabelle eine Hilfszelle anlege die dann auch mit rounddown arbeiten kann. Da habe ich dann aber das Problem, dass die Felder keine Währung sind oder andere Formatierungsprobleme haben mit Nachkommastellen oder sonstiges.

    Wie kann ich also einfach in meinem Formular die Eingabe so einschränken, dass man nur Werte eingeben kann, die durch 50 teilbar sind?

    Freundliche Grüße

    Dustin Strübel

    Jotform Thread 22347443 Screenshot
  • Paolo Jotform Support
    Geantwortet am 19. Dezember 2024 um 09:54

    Hi Dustin,

    Thanks for reaching out to Jotform Support. Unfortunately, our German support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in German, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    As for your question, to restrict numbers divisible by 50 in your form. We can set up conditional logic to hide the submit button and show an error message if the number is not divisible by 50. In order to do this, we need to add a form calculation widget and a paragraph element. Let me show you how it's done:

    Adding the Form Calculation widget and Paragraph Element.

    1. While in Form Builder, click on the Add Element menu on the left side of the page.
    2. Under the Widget tab, scroll down the list and choose the Form Calculation Widget.
    3. Now, just drag and drop it to your form. Go to the Basic Tab, and do the same steps to add a Paragraph Element.
    4. Customize the text of the Paragraph Element to make it your error message and Hide the field by going to the Advanced Tab and turning on Hide Field.

    Rundungsprobleme innerhalb einer Form Image 1 Screenshot 70

    Setting up the conditional logic for the formula of the divisibility check.

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Settings.
    2. Click on Conditions on the left side of the screen.
    3. Now, select the Add Condition button and choose the Update/Calculate field Condition.

    Rundungsprobleme innerhalb einer Form Image 2 Screenshot 81

    4. Configure the condition settings based on the screenshot below and make sure to Save your condition.

    Rundungsprobleme innerhalb einer Form Image 3 Screenshot 92

    Note that I just added a number field on where the user inputs the number, just replace it with your actual field. Let's now add the condition to hide the submit button if the number is not divisible by 50 and add the error message.

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Settings.
    2. Click on Conditions on the left side of the screen.
    3. Now, select the Add Condition button and choose the Show/Hide Field Condition.

    Rundungsprobleme innerhalb einer Form Image 4 Screenshot 103

    4. Configure the condition settings based on the screenshot below and make sure to Save your condition.

    Rundungsprobleme innerhalb einer Form Image 5 Screenshot 114

    Let me share the results on the screencast below:

    Rundungsprobleme innerhalb einer Form Image 6 Screenshot 125 Give it a try and let us know how it goes.