Issue Bug Closed

#103217Telephone link - TCA type "link" - can't input phone number without linkwizard

Christian Hackl 02/27/24, 16:32 updated 03/31/25, 14:52

Description

If you have a TCA field with “type” => “link”, and “allowedTypes” => [‘telephone’].

Then you can’t input a phone number in the backend WITHOUT linkwizard, like the following:
+49 581 3548
or
tel:+49 581 3548

Only if i write the phone number in double quotes, like:
“tel:+49 581 3548”

I don’t think this is particularly nice, especially for editors or consistent with the “normal” input fields e.g. email, where you can input mail addresses on the “fly” without opening the linkwizard.

'test_phone_field' => [
    'label' => 'test phone link',
    'config' => [
        'type' => 'link',
        'eval' => 'trim',
        'default' => '',
        'placeholder' => '+49 851 654 754 33',
        'allowedTypes' => ['telephone']
    ],
],

AND sometimes i get the error message, if i try to write directly into the input field:
1: Link type “page” is not allowed for the field “test_phone_field” of the table “tx_myext_domain_model_test”

But maybe this request is more a feature don’t know how we can fix this with the phone number – i think it would be easier and better if we had a own TCA type for phone numbers, like the mail field: ‘type’ => ‘email’ with a new attribute type “pattern”, so every integrator / dev can set this validation “pattern” for their needs.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.