Unset fields as required for a Form In my drupal-based project, we make a difference between laptop users and tablet users: Laptop users can skip some fields when registering, whereas tablet users have to fill in all of them. The trick is easily done by hiding or showing those fields from the signup form with jQuery and Modernizr. And I say trick, because it works, despite some of those hidden fields being marked as required, they are still allowed to signup without filling on them.

The problem comes when users forget their password and request a link to create a new one.
When they get to the screen of "Enter new password and confirm it", users who have initially signed up via laptop (i.e., not filling on some of the required fields), cannot continue because they get the error "Fields X and Y cannot be left blank", or sth similar.

I want to disable these 2 fields from being required for Drupal (not from the signup form, where I have already "hidden" them), but I am not sure how to proceed. Where should I do this?
I would suggest, you use hook_form_alter() and then check for laptop users. If laptop users are on form then make #required false for these two fields. 

Example:  

$form['title']['#required'] = FALSE; 


Note: FYI Avoid using unset() in such type of scenario either set the #access property or #required property to FALSE. This keeps them in the form build tree, which avoids problems if other modules try to access or alter that information.