Mmmm, I think I am missing a “migration”. That step is not really explained in the doc as far as I could find. But it seems that tutor local do init is taking care of it.
It would be good if such step was actually documented, with the commands to run.
Ok, after running tutor local do init, I no longer have an error in the profile or account pages.
However, I also do not see the extended form in the registration page, nor on the profile or account page (where I would expect that users are able to change their answers).
In fact, grepping for PROFILE_EXTENSION_FORM through the code base, I find no occurence of such in any of the frontend-app repositories, only in edx-platform. Is this bit of code expected to already be usable in one or more of the frontend apps ?
Antigravity managed to write a plugin slot to use with org.openedx.frontend.profile.additional_profile_fields.v1
That makes the fields appear in the Profile page. It does not, however, add the fields at registration, which is what I was aiming to do. Any guidance for this would be appreciated.
I didn’t understand the review feedback on the PR so I’ve gone ahead and closed it. However if you think this documentation is helpful and want to assist in review/rewriting to get it merged, please feel free to add review comments & I can reopen it.
I had a look at your PR, and while I was missing the REGISTRATION_EXTRA_FIELDS, adding the following to my tutor plugin does not make the fields appear at registration
does actually add validation that those fields must be present in the payload…
I see that through the developer tools, the response from the server is:
{
"position": [
{
"user_message": "Il vous manque un ou plusieurs champs obligatoires"
}
],
"research_area": [
{
"user_message": "Il vous manque un ou plusieurs champs obligatoires"
}
],
"error_code": "validation-error"
}
however it does not produce the form items in the registration page. So it makes registration impossible.
Unfortunately I don’t actually know anything about this I tried to take over a PR that someone else wrote hoping that it would be easier for them to do a PR review than writing the docs. That didn’t happen, unfortunately, and am still hoping someone who knows more than me is willing to help get the docs improved and merged.
The step-by-step instructions on what you need to configure to make it work are explained right there. However, I will also explain it here in a bit more detail:
With this configuration, all configured fields are required to complete the registration; however, they can be set as optional or hidden. The configuration depends on your needs.
REGISTRATION_EXTRA_FIELDS can have the following values:
"required" — mandatory to complete registration.
"optional" — it is shown but can be left empty.
"hidden" — it is not shown (default behavior if it doesn’t appear in the dict).
For it to work correctly with your new custom fields and save them to the DB, you must also add them to the extended_profile_fields list.