Hi,
We are using the ASP Net Zero lookup:

I can see in the code it is essentially a disabled text box that shows the selection of the picker:

Is there any way to make the control required? i.e. a selection must be made. At the moment adding required to the input does not work because it is disabled. And we want to keep it disabled because we only want the text set from the picker.
Any ideas? Cheers
5 Answer(s)
-
0Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
-
0
Hi @ismcagdas
Thanks for your reply.
you can add required attribute to the input element, so it will be validated when user submits the form.
Unfortunately this does not work. The input is disabled and when disabled it also disables the required attribute.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
Thanks. Could you create an issue on https://github.com/aspnetzero/aspnet-zero-core ? Our team will check this problem and find a solution.
Thanks,
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi ismcagdas,
I have found a workaround which is to mark the field as readonly instead of disabled. This then allows the required attribute work.
Thanks
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @Astech
Thank you for sharing the solution :)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
