There might be an issue with file fields.

I have a required file field for a certain role in a certain registration page. It works great in this registration page.

The problem occurs in the general registration page, where I get an error message that this particular file field is required. It's not active for the general registration page. I've checked and this only happens for file fields.

Do you have any idea what goes wrong in my case?

Thanks for the great work.

Comments

vishal.sheladiya created an issue. See original summary.

ysamoylenko’s picture

Hello @vishal.sheladiya,

I think that happens because this field is marked as required all time, and to solve this issue we need to replicate the functionality related to D8 module version 'this field is required for' functionality.

In that case, you will need to set the 'required' flag only for the role but not for the whole field.

ysamoylenko’s picture

Category: Bug report » Feature request
Status: Active » Needs review
StatusFileSize
new2.94 KB
new23.12 KB

Hello @vishal.sheladiya,

I've implemented the patch for fixing your issue, please try to apply it and check the problem again.

ysamoylenko’s picture

StatusFileSize
new2.9 KB

A new version of the patch uploaded.
Please review it instead of the previous patch.

ysamoylenko’s picture

StatusFileSize
new2.41 KB
IreneV’s picture

Looks great!
Approved!

IreneV’s picture

Status: Needs review » Reviewed & tested by the community

  • ysamoylenko committed 46cd941 on 7.x-1.x
    Issue #3054449 by ysamoylenko, IreneV, vishal.sheladiya: Issue with file...
ysamoylenko’s picture

Status: Reviewed & tested by the community » Fixed

The patch was committed.
Thank you for your participation in module development.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.