-<input type="text" {*
+<input type="{$field->getInputType()}" {*
*}id="{$field->getPrefixedId()}" {*
*}name="{$field->getPrefixedId()}" {*
*}value="{if !$field->isI18n() || !$field->hasI18nValues() || $availableLanguages|count === 1}{$field->getValue()}{/if}"{*
-<input type="text" {*
+<input type="{$field->getInputType()}" {*
*}id="{$field->getPrefixedId()}" {*
*}name="{$field->getPrefixedId()}" {*
*}value="{if !$field->isI18n() || !$field->hasI18nValues() || $availableLanguages|count === 1}{$field->getValue()}{/if}"{*
$this->validateMinimumLength($text, $language);
$this->validateMaximumLength($text, $language);
}
+
+ /**
+ * Returns the value for the `type` attribute of the input field.
+ * @since 6.0
+ */
+ public function getInputType(): string
+ {
+ return 'text';
+ }
}
}
}
}
+
+ /**
+ * @inheritDoc
+ */
+ public function getInputType(): string
+ {
+ return 'url';
+ }
}