Condição do formulário não funciona

  • tami_AO
    Perguntado em 15 de outubro de 2023 às 12:25

    Boa tarde

    Estou com dificuldade na criação de uma condição de cálculos num formulário.

    Já verifiquei todos os campos mas o resultado que eu preciso não aparece no campo para saída final. Vocês conseguem me ajudar a detectar o erro?
    Condição do formulário não funciona Image 1 Screenshot 40
    Condição do formulário não funciona Image 2 Screenshot 51
    Condição do formulário não funciona Image 3 Screenshot 62

  • Angeli Jotform Support
    Respondido em 15 de outubro de 2023 às 17:06

    Hi Tami,

    Thanks for reaching out to Jotform Support. Unfortunately, our Portuguese 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 Portuguese, 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.

    Now, let me help you with your question. I see that you're using a Masked Input widget in your calculation. Unfortunately, we can't use the Masked Input widget in calculations, but there's a workaround. Let me show you how to set that up:

    1. In Form Builder, go to Widgets tab and drag and drop the Form Calculation widget to your form.

    2. Click on the Wand icon of the Form Calculation widget and add 'Salário/Rendimento líquido' as a field.

    Condição do formulário não funciona Image 1 Screenshot 50

    3. Then, click the Gear icon of the Form Calculation widget and Hide the field from Advanced tab.

    Condição do formulário não funciona Image 2 Screenshot 61

    4. Next, replace 'Salário/Rendimento líquido' with the Form calculation widget in the Update/Calculate condition and click Save.

    Condição do formulário não funciona Image 3 Screenshot 72

    Here's the result:

    Condição do formulário não funciona Image 4 Screenshot 83

    For demo purposes, I didn't hide the Form Calculation widget. You may clone or test my demo form here.

    Give it a try and let us know if you have any other questions.

  • tami_AO
    Respondido em 16 de outubro de 2023 às 04:27

    Bom dia,

    Resolveu até certa parte.

    Ele só apresenta o resultado se no campo salário/rendimento líquido tiver apenas 3 números, tal como o seu exemplo (100). Se inserir um número maior, ele não calcula.

    Condição do formulário não funciona Image 1 Screenshot 40

    Condição do formulário não funciona Image 2 Screenshot 51

    Estas são as 3 condições que eu preciso que ele me dê:
    Condição do formulário não funciona Image 3 Screenshot 62

    Este é o formulário:

    https://form.jotform.com/232881813202552

  • Reymar Jotform Support
    Respondido em 16 de outubro de 2023 às 18:00

    Hi Tami,

    Thank you for reaching out to Jotform Support. I cloned your form ID 232881813202552 and tried to replicate the issue, but everything worked the way it should. Check out my results in the screencast below:

    Condição do formulário não funciona Image 1 Screenshot 20

    I have cleared your form cache. Can you also clear your Jotform account cache and give it another try?

    Keep us updated and let us know if you need any more help.


  • tami_AO
    Respondido em 19 de outubro de 2023 às 14:58

    Boa noite,

    Como pode ver no seu exemplo preenchido, no campo Taxa de esforço não aparece nenhum nº, mas era suposto.

    Neste momento ele só calcula se em "Valor de crédito" tiver apenas 3 caracteres, se colocar mais que 3 nºs ele não dá o resultado.

    Taxa de esforço=Nº de prestações/salário mensal

  • Angeli Jotform Support
    Respondido em 19 de outubro de 2023 às 15:55

    Hi Tami,

    Thanks for getting back to us. When I tested your form, the same thing happened. I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.

    Thanks for your patience.

  • Angeli Jotform Support
    Respondido em 19 de outubro de 2023 às 17:53

    Hi Tami,

    Thanks for patiently waiting. It seems that the reason why there's no value showing in the '% Taxa de esforço' is because your calculation below is incorrect:

    Condição do formulário não funciona Image 1 Screenshot 40

    Please see the sample computation:

    Salário/Rendimento líquido = 350,000.0

    Número de prestações = 4

    Result: (4/350,000.00)*100 =0.001142857142857

    Since in your calculation, the 'Decimal Places in Numerical Results' is 0, no result will be displayed:

    Condição do formulário não funciona Image 2 Screenshot 51

    If you'll change the above setting to a higher number, you will get the result of the calculation. Let me show you how:

    1. In Form Builder, in the orange navigation bar at the top of the page, click on Settings.
    2. Click on Conditions in the menu on the left side of the page.
    3. Hover your mouse over the calculation linked to % Taxa de esforço and click the Pencil Icon.
    4. Click the 3 dots icon and go to Options tab.
    5. Then, change the Decimal Places in Numerical Results from 0 to your preferred number.

    Condição do formulário não funciona Image 3 Screenshot 62

    You can clone my demo form here to check.

    Reach out again if you have any other questions.

  • Tatiana Alexandra
    Respondido em 20 de outubro de 2023 às 01:54

    Para este exemplo que envio o print, o valor da taxa de esforço tinha que ser 57,58. Mas ele não apresenta o resultado

    Condição do formulário não funciona Image 1 Screenshot 30

    Condição do formulário não funciona Image 2 Screenshot 41


  • tami_AO
    Respondido em 20 de outubro de 2023 às 01:57

    Eu realmente tinha a formula errada, a correcta é:

    Taxa de esforço= (Valor de prestação/ Salário)*100

    Mas ainda assim, dá um número errado.

    Para este exemplo que envio o print, o valor da taxa de esforço tinha que ser 57,58. Mas ele não apresenta o resultado

    Condição do formulário não funciona Image 1 Screenshot 30

    Condição do formulário não funciona Image 2 Screenshot 41


  • Mary Jotform Support
    Respondido em 20 de outubro de 2023 às 05:00

    Hi Tami,

    Thanks for getting back to us. I would like to clarify how to compute the taxes. The computation will not work due to the value from the masked input widget. The value it carries is an alphanumeric, and calculation should only be numerical in data type. This was specified by my colleague in the previous response. Conditions sometimes do not work with widgets, as they run from a different script. I would recommend revisiting the workaround suggested by Angeli or use regular form fields supporting numerical data.

    Condição do formulário não funciona Image 1 Screenshot 20

    Let us know if you have any other questions.