How to hide the submit button on a node add/edit form page within which a entity reference select list has no valid option? Registration content type has a required entity reference field. The widget of this field is a select list, the options are populated with a views entity reference display output. I want to hide(unset) the submit button if the views entity reference display returns no value.
I've asked a question here for reference, I'm suggested to post a new question.
You can do this by using hook form FORM ID alter .

Once hooked in you find the $form item for the drop down list.  It'll be somewhere like 

$form['field_my_entity_ref']['und']['#options'] 

So you should be able to make a check on the values in that array and if there are none then make the Submit button disabled .  My guess is 

if ( count($form['field_my_entity_ref']['und']['#options']) &lt; 1 ) {

   $form['#submit']['#disabled'] == TRUE;
 }


https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7.x/#disabled

https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_FORM_ID_alter/7.x