Skip to content

Commit 183605b

Browse files
mglamanJohnAlbin
andauthored
fix(next): url form element for Next.js site form
Fixes #614 Co-authored-by: John Albin Wilkins <virtually.johnalbin@gmail.com>
1 parent eb903c1 commit 183605b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/next/src/Form/NextSiteForm.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function form(array $form, FormStateInterface $form_state) {
3838
];
3939

4040
$form['base_url'] = [
41-
'#type' => 'textfield',
41+
'#type' => 'url',
4242
'#title' => $this->t('Base URL'),
4343
'#description' => $this->t('Enter the base URL for the Next.js site. Example: <em>https://example.com</em>.'),
4444
'#default_value' => $entity->getBaseUrl(),
@@ -60,7 +60,7 @@ public function form(array $form, FormStateInterface $form_state) {
6060
];
6161

6262
$form['preview']['preview_url'] = [
63-
'#type' => 'textfield',
63+
'#type' => 'url',
6464
'#title' => $this->t('Preview URL'),
6565
'#description' => $this->t('Enter the preview URL. Example: <em>https://example.com/api/preview</em>.'),
6666
'#default_value' => $entity->getPreviewUrl(),
@@ -83,7 +83,7 @@ public function form(array $form, FormStateInterface $form_state) {
8383
];
8484

8585
$form['revalidation']['revalidate_url'] = [
86-
'#type' => 'textfield',
86+
'#type' => 'url',
8787
'#title' => $this->t('Revalidate URL'),
8888
'#description' => $this->t('Enter the revalidate URL. Example: <em>https://example.com/api/revalidate</em>.'),
8989
'#default_value' => $entity->getRevalidateUrl(),

0 commit comments

Comments
 (0)