do not display name fields

This commit is contained in:
Karol Wypchlo 2021-04-07 11:56:44 +02:00
parent d268a99e60
commit fdca0a903c
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import SelfServiceMessages from "./SelfServiceMessages";
export default function SelfServiceForm({ flow, config, fieldsConfig, title, button = "Submit" }) { export default function SelfServiceForm({ flow, config, fieldsConfig, title, button = "Submit" }) {
const fields = config.fields const fields = config.fields
.filter((field) => field.name.startsWith("traits.name")) .filter((field) => !field.name.startsWith("traits.name")) // drop name fields
.map((field) => ({ ...field, ...fieldsConfig[field.name] })) .map((field) => ({ ...field, ...fieldsConfig[field.name] }))
.sort((a, b) => (a.position < b.position ? -1 : 1)); .sort((a, b) => (a.position < b.position ? -1 : 1));
const formik = useFormik({ const formik = useFormik({