diff --git a/src/components/FieldSetWithStatus.tsx b/src/components/FieldSetWithStatus.tsx index 38fea9f4..24560ff6 100644 --- a/src/components/FieldSetWithStatus.tsx +++ b/src/components/FieldSetWithStatus.tsx @@ -17,6 +17,7 @@ export default function FieldSetWithStatus({ loading, required, readOnly, + capitalize, type = 'text', inputRef, }: { @@ -31,6 +32,7 @@ export default function FieldSetWithStatus({ loading?: boolean required?: boolean readOnly?: boolean + capitalize?: boolean type?: 'text' | 'email' | 'password' | 'checkbox' inputRef?: LegacyRef }) { @@ -92,7 +94,7 @@ export default function FieldSetWithStatus({ autoComplete="off" readOnly={readOnly || pending} className={cc(type === 'text' && 'w-full')} - autoCapitalize="off" + autoCapitalize={!capitalize ? 'off' : undefined} />} ); diff --git a/src/photo/PhotoForm.tsx b/src/photo/PhotoForm.tsx index d6a5f3a1..b88df10d 100644 --- a/src/photo/PhotoForm.tsx +++ b/src/photo/PhotoForm.tsx @@ -143,6 +143,7 @@ export default function PhotoForm({ options, optionsDefaultLabel, readOnly, + capitalize, hideIfEmpty, hideBasedOnCamera, loadingMessage, @@ -163,6 +164,7 @@ export default function PhotoForm({ selectOptionsDefaultLabel={optionsDefaultLabel} required={required} readOnly={readOnly} + capitalize={capitalize} placeholder={loadingMessage && !formData[key] ? loadingMessage : undefined} diff --git a/src/photo/form.ts b/src/photo/form.ts index 7af82e20..57103c49 100644 --- a/src/photo/form.ts +++ b/src/photo/form.ts @@ -22,6 +22,7 @@ type FormMeta = { note?: string required?: boolean readOnly?: boolean + capitalize?: boolean hideIfEmpty?: boolean hideTemporarily?: boolean hideBasedOnCamera?: (make?: string, mode?: string) => boolean @@ -32,7 +33,7 @@ type FormMeta = { }; const FORM_METADATA: Record = { - title: { label: 'title' }, + title: { label: 'title', capitalize: true }, tags: { label: 'tags', note: 'comma-separated values' }, id: { label: 'id', readOnly: true, hideIfEmpty: true }, blurData: {