Skip to content

Scheduling infrastructure for absolutely everyone.

chore: add autocomplete for inputs - name, phone, location (#24422)

Dhairyashil Shindeb183239ff547
diff --git a/packages/features/components/phone-input/PhoneInput.tsx b/packages/features/components/phone-input/PhoneInput.tsx
index c7264ea2e06..e1a35af2c4c 100644
--- a/packages/features/components/phone-input/PhoneInput.tsx
+++ b/packages/features/components/phone-input/PhoneInput.tsx
@@ -68,6 +68,7 @@ function BasePhoneInput({
name,
required: rest.required,
placeholder: rest.placeholder,
+ autoComplete: "tel",
}}
onChange={(val: string) => {
onChange(`+${val}`);
@@ -118,6 +119,7 @@ function BasePhoneInputWeb({
name,
required: rest.required,
placeholder: rest.placeholder,
+ autoComplete: "tel",
}}
onChange={(val: string) => {
onChange(`+${val}`);
diff --git a/packages/features/form-builder/Components.tsx b/packages/features/form-builder/Components.tsx
index 4a1a5bfd6c2..09ac0f2d3fe 100644
--- a/packages/features/form-builder/Components.tsx
+++ b/packages/features/form-builder/Components.tsx
@@ -145,6 +145,7 @@ export const Components: Record<FieldType, Component> = {
value={value}
required={variantField.required}
type="text"
+ autoComplete="name"
onChange={(e) => {
props.setValue(e.target.value);
}}
@@ -174,6 +175,13 @@ export const Components: Record<FieldType, Component> = {
value={value[variantField.name as keyof typeof value]}
required={variantField.required}
type="text"
+ autoComplete={
+ variantField.name === "firstName"
+ ? "given-name"
+ : variantField.name === "lastName"
+ ? "family-name"
+ : undefined
+ }
onChange={(e) => onChange(variantField.name, e.target.value)}
/>
))}
@@ -211,6 +219,7 @@ export const Components: Record<FieldType, Component> = {
type="email"
id={props.name}
noLabel={true}
+ autoComplete="email"
{...props}
onChange={(e) => props.setValue(e.target.value)}
/>
@@ -543,7 +552,7 @@ export const Components: Record<FieldType, Component> = {
url: {
propsType: propsTypes.url,
factory: (props) => {
- return <Widgets.TextWidget type="url" noLabel={true} {...props} />;
+ return <Widgets.TextWidget type="url" autoComplete="url" noLabel={true} {...props} />;
},
},
} as const;
diff --git a/packages/ui/components/address/AddressInput.tsx b/packages/ui/components/address/AddressInput.tsx
index 6bca4291e61..2af636c0483 100644
--- a/packages/ui/components/address/AddressInput.tsx
+++ b/packages/ui/components/address/AddressInput.tsx
@@ -22,6 +22,7 @@ function AddressInput({ value, onChange, ...rest }: AddressInputProps) {
/>
<Input
{...rest}
+ autoComplete="address-line1"
value={value}
onChange={(e) => {
onChange(e.target.value);