On my site I added a REQUIRED time field to my stores.

The problem is that if no schedule is entered, the field is still validated.

Comments

zenimagine created an issue. See original summary.

johnv’s picture

Status: Active » Postponed (maintainer needs more info)

I am not sure what you mean. Can you provide a screenshot?

zenimagine’s picture

I add an "Office hours" field, I check the "Required field" box. When I create a form, and the "Office hours" field is empty, the form can still be validated.
Normally it should display an error message to say that the chapter "Office hours" is required.

johnv’s picture

Please test latest dev-version. It may be resolved, as part of #3110642: Introduce OfficeHoursDateTime::get() and isEmpty().
Please report back your test results.

zenimagine’s picture

StatusFileSize
new126.07 KB

Thanks, it works ;-)

But the template to display the schedules in the form is disastrous. We really have to deal with the problem of responsive design. The schedules are unusable on the desktop when there are error messages and it is even worse on mobile.

johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.2
Status: Postponed (maintainer needs more info) » Fixed

I guess, this is fixed, then.
Let's leave the other topic in the 'responsive' issue.
Groeten,

johnv’s picture

Component: Code » Code - widget

Status: Fixed » Closed (fixed)

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