Work with Anonymous user ?

Created on 23 April 2025, about 1 month ago

Problem/Motivation

Hi, I have a use case where anonymous user is sent an email message to complete a reference letter. The fields are set to required for anonymous role. But when an Admin loads the entity edit form, the fields are still required ?

Steps to reproduce

Use a simple content-type and set the body field to required by role anonymous. As an Admin, try to create or edit an entity of this type, and view if the field(s) are open or still required.

I could be missing something.

D10.4.6

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States goose2000

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @goose2000
  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    Are you sure they are actually still required? The red asterisks still shows, but you shouldn't get any validation errors when saving the entity.

  • πŸ‡§πŸ‡ͺBelgium matthieu_collet

    I have the same issue
    It's still required because of the browser, you must remove the * and the required="required"

  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    I just tested but I can't reproduce the issue. I'm using required_api 3.0.0-beta1 and required_by_role 2.0.0-beta3.

  • πŸ‡§πŸ‡ͺBelgium matthieu_collet

    Thank you for your feedback Dieter

    same version here, but still the problem, here is the code of the filed with user 1 (Administrator) :

    <input data-drupal-selector="edit-field-contactemail-0-value" aria-describedby="edit-field-contactemail-0-value--description" type="email" id="edit-field-contactemail-0-value" name="field_contactemail[0][value]" value="" size="60" maxlength="254" placeholder="" class="form-email required form-element form-element--type-email form-element--api-email" required="required" aria-required="true">

Production build 0.71.5 2024