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.

enter image description here

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 data-bind attribute.

Is there a way to make these fields required?

  • I think you'll need to modify \sitecore\shell\client\Applications\FormsBuilder\Dialogs\ExportDataDialogWindow\ExportData.js submit handler to do this validation – Mark Gibbons Nov 5 '19 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.