I have a content type with required field in it. If the field is disabled then Drupal won't verify it. (it is being verified if not disabled). How can I verify that the field has a value even if it's disabled?
More details:
For some of the users I set the value by Prepopulate and disable the field (by implementing the hook hook_form_alter
).
I still want to prevent the user from messing with the URL. For example: he can take the "new content" link I've created for him that looks like:
/node/add/my_type?edit[field_to_set]=12
and remove the URL query:
/node/add/my_type
I thought that if he would do it, he won't be able to save the form because of the required field (which is disabled) - but Drupal won't verify it.