The function taarikh_select_validate didn't work properly, attached patch to fix the error.
The patch needs review.
Scenario:
-Build a custom form and create a form input of #type => taarikh_select select the values to be 4/8/1438
-When submit the validation will be wrong returns error message of undefined index #instance
Reason
- the function taarikh_select_input_date by mistake replace the day with month which returns not exist date.
The simple patch I made to get the date elements from the submittted values, See and review.
Comments
Comment #2
hussainwebThank you for the patch. I don't think commenting out the whole block is the right approach.
It seems the warning you get is because the date somehow failed validation and it tried to display an error message. While displaying the error message, it tried to get the field label but since there is no field here, you get a different error. The attached patch fixes that problem.
After applying the patch, you should get a different error. Please let me know what error do you get.
Comment #4
hussainwebI am marking this as fixed for now. If you get an error message for your date (or some other error message), please reopen or create a new issue.