bolt / bolt/users

Fields in content type don't appears in /profile/edit

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
8
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Hello,

I want to set up profile editing from the frontend.
As written in the doc, I created a contentType

```
members:
slug: members
name: Members
singular_name: Member
title_format: "{author.username}"
fields:
dob:
type: date
adresse:
type: text
ville:
type: text
viewless: true

```
Then I inserted the following lines into bolt-userextension.yaml:

```
groups:
ROLE_MEMBER:
redirect_on_register: homepage
redirect_on_login: /
initial_status: enabled
contenttype: members
allow_profile_edit: true
profile_edit_template: 'edit_profile.twig'

```
And finally my twig file edit_profile.twig contains the following lines:

```

{% for field in record.fields %}

{{ dump(field) }}


{% if field.type === 'text' %}

{% elseif field.type === 'textarea' %}
{{ field.parsedValue }}
{% elseif field.type === 'checkbox' %}

{% elseif field.type === 'date' %}

{% endif %}
{% endfor %}







```

Nothing is displayed, according to the DUMP, record.fields only contains the slug :

```
[Bolt\Entity\Field\SlugField]{
-id: 29
+name: "slug"
-sortorder: 0
-version: null
-content: [Bolt\Entity\Content]...
-parent: null
-fieldTypeDefinition: [Bolt\Configuration\Content\FieldType]
-useDefaultLocale: true
#translations: [Doctrine\ORM\PersistentCollection]
#newTranslations: null
#currentLocale: "fr"
#defaultLocale: "fr"
}
```

Any ideals ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.