Telefonnummer trennen

  • online21
    Gefragt am 28. Februar 2024 um 10:37

    Hallo,

    gibt es eine Möglichkeit wenn man eine Telefonnummer eingibt das die Vorwahl und die Rufnummer in einem eigenen Textfeldern automatisch getrennt ausgefüllt werden?

    Wie im Beispiel darunter! Die Telefonnummer ist ein Pflichtfeld und die Vorwahl und die Rufnummer müsste dann automatisch befüllt werden.

    Telefonnummer trennen Image 1 Screenshot 30Telefonnummer trennen Image 2 Screenshot 41

    Bitte um Hilfe!

    Danke!

    Gruß

    Manuel

  • Jefferson Jotform Support
    Geantwortet am 28. Februar 2024 um 12:53

    Hi online21,

    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.

    Now, let me help you with your question. I understand the issue, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

  • Jefferson Jotform Support
    Geantwortet am 28. Februar 2024 um 13:12

    Hi online21,

    Thanks for patiently waiting. To separate the area code and the phone number, we need to use the Substring widget. I have provided a workaround that you can follow. Let me show you how:

    1. In Form Builder, click on the Build tab in the orange navigation bar at the top of the page.
    2. Select your phone number and click on the gear icon.
    3. Go to the Options tab and toggle the Input Mask as On.
    4. Now, click on the Add Form Element on the left-hand side of your page.
    5. Go to the Widgets tab and search for the Substring Widget.
    6. Drag 3 Substring Widget into your form. Telefonnummer trennen Image 1 Screenshot 40
    7. Select each Substring widget and click on the wand icon. Enter the substring start and end fields for each widget:
    8. For the 1st Substring: Substring start = 1 , Substring end = 4.
    9. For the 2nd Substring: Substring start = 6 , Substring end = 9.
    10. For the 3rd Substring: Substring start = 10 , Substring end = 14. Telefonnummer trennen Image 2 Screenshot 51

    That's it! Test your form and should see the same output as in my screencast below:

    Telefonnummer trennen Image 3 Screenshot 62

    You can also check out this guide on How to use the Substring Widget.

    Give it a try and let us know how it goes.