Dear Drupal Team,
When a user fills in the webform https://survey-poll.web.cern.ch/users_survey and forgets to fill in a mandatory field (eg.institute field), the label “Please fill out this field” appears somewhere randomly on the page (in the top part mostly: either covering the logo, or above the banner), not next to the required field as it should be. Is there any way to fix that?
I tested it and you are right that the error message appears on top of the menu but the position is not random. The issue is that when it automatically scrolls back up to react the error, it stop just before the field and does not react it. I will try to find a solution and I will answer.
Hello Konstantinos once again,
I have noticed two more unusual behaviors in the webform elements:
When using the radio buttons element, the mandatory field star appears at the bottom line as compared to all the other types of elements where it appears at the top (the last question in my survey):
When using the date list element and setting it as a mandatory field, the “mandatory” star does not appear at all (the mandatory function works as expected though). Please see here:
Can I clone your site in order to have a better look since it is a production site?
Yes, please. Thank you, Konstantinos.
I am answering your questions inline.
The asterisk always appears at the end of the the title/question. In this case the title is long so it has to break to the second line. As a result it appears in the second line.
Are you sure about it? I just visited a form in your site that has a required date field and the asterisk appears as it should. Can you confirm or specify which exact form and question it appears?
- I understand that the asterisk appears at the end of the sentence. The problem is that it appears at the bottom of the line, not at the top. Let me make two screenshots for comparison:
It is not a major problem, it is just that there is no visual consistency.
- We are looking at two different questions in the survey. There is no mandatory asterisk at the LAST question. Please tick “Yes” here:
A new question comes up without the asterisk:
Thank you for looking into this!
Now the issue is more clear thank you for specifying and reporting it. I created an issue in order to be resolved in one of the next versions.