Sitecore version 9.0.2
I have a form of which I wish to export the data to a CSV. This is built in/out of the box functionality. I have a requirement that if the user opts to export a Date Range instead of the complete list, From and To fields should be required.
I marked both fields as required under
core/sitecore/client/Applications/Forms/Dialogs/ExportDataDIalogWindow/PageSettings/ExportDataForm/StartDatePicker and EndDatePicker. This now shows them as required in the dialog.
However, when I select Date Range on the dialog, neither field behaves as if it is required. If I fill in 1 or the other, it still allows the export. If I fill in neither field, it still allows the export.
If I go into Chrome Devtools and add the
required attribute to the fields, the dialog is removed and says that the data is being exported and a notification will be sent when ready. Same as if I put
required: IsRequired in the
Is there a way to make these fields required?