Form Calculation Widget: Copy phone number field's value

  • Marco_Romano
    Domanda del 27 ottobre 2023 alle ore 06:30

    Buongiorno,

    Ho necessità di utilizzare la funzione di "Calcolatrice per Moduli" facendo una concatenazione del campo "Selettore Prefisso Telefonico" in modo da trasformarlo in un unico numero concatenato. E' possibile?
    Grazie

  • Shane Jotform Support
    Risposta del 27 ottobre 2023 alle ore 09:28

    Hi Niccolo,

    Thanks for reaching out to Jotform Support. Unfortunately, our Italian 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 Italian, 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. The Form Calculation widget will automatically concatenate the Area Code with the Number when it copies the value, all you need to do is to set up the copying of the value. I'll walk you through setting that up:

    1. In Form Builder, add the Form Calculation widget from the Form Elements.

    Form Calculation Widget: Copy phone number fields value Image 1 Screenshot 60
    2. Click the Wand icon.
    3. Click Add Field, then select the Phone Number widget.
    3. Click Save.
    Form Calculation Widget: Copy phone number fields value Image 2 Screenshot 71
    Result:
    Form Calculation Widget: Copy phone number fields value Image 3 Screenshot 82
    You might want to hide the Form Calculation widget. Let me show you how to do that:
    1. Click the Gear icon from the Form Calculation widget.
    2. Click the Advanced Tab.
    3. Turn on the Hide Field option.

    Form Calculation Widget: Copy phone number fields value Image 4 Screenshot 93
    Finally, to add the Calculation Widget to the PDF, follow instructions and screencast below:
    1. Click the Add to PDF button from the Form Calculation widget.
    2. Click anywhere in the Original PDF and drag the box in the desired position.
    Form Calculation Widget: Copy phone number fields value Image 5 Screenshot 104
    Give it a try and let us know how it goes.

  • Marco_Romano
    Risposta del 27 ottobre 2023 alle ore 12:07

    Hello Shane,

    Thanks for helping in this. I need to have a full phone number without the initial zeros that are inside the prefix of the number, is it possible to remove them with the calculator?
    The reason why I need this is because we have an integration with an app that sends SMS to those numbers and the only way it works is by excluding the initial zeros.

    Thank you

  • Shane Jotform Support
    Risposta del 27 ottobre 2023 alle ore 13:49

    Hi Niccolo,

    Thanks for getting back to us. No, you can't remove the zeros using the calculator. Although, I checked some area codes from one of our widgets and most of them do not have zeros. See screenshot below:
    Form Calculation Widget: Copy phone number fields value Image 1 Screenshot 30
    Are you referring to when the user adds a zero at the start of their number, even with the area code (E.g. +610400000000 as opposed to the correct +61400000000)? If so, you can use the Phone Picker widget since it limits the number of digits based on the country which does not include the leading zero, preventing users from doing so. See screencast below:

    Form Calculation Widget: Copy phone number fields value Image 2 Screenshot 41
    If that's not exactly what you are looking for, can you tell us what app you are using to send SMS? We also have an SMS Confirmation widget that might work for you.

    Once we hear back from you, we'll be able to move forward with a solution.