Project

General

Profile

Actions

Bug #103217

open

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

Added by Christian Hackl about 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-02-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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":
I 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.

No data to display

Actions

Also available in: Atom PDF