Hi, i have created a custom module with a widget that has one textfield and one selectfield. Those two fields i have wrapped in a fieldset. So if i set that field as required i check this in the hook_field_widget_form and inherit this required state from the fieldset to the textfield.
On my site i have a checkbox. With the conditinal fields module i have configured that if this is checked my custom field is not visible. The problem now is that i could not submit the form because i get a required error.
How do i have to make my custom field, or to be more specific, how to i have to do the required check? I have also a working solution but then i get no message and only the red highlighting.

Comments

brulain’s picture

Subscribing

dqd’s picture

Status: Active » Closed (outdated)

Thanks for the reports and all the efforts and hard work in here. But due to inactivity in this issue for years and because of the upcoming EOL of Drupal 7, I will close this issue on th way cleaning up the issue queue.

Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others.