I have written a custom Drupal 7 module which needs to set the value of a radio button of an entityform based on a value queried from the database. I have tested hook and it is working as i am able to set a text field with in the form using:
$form['field_sem_submitter_id']['und'][0]['value']['#value'] = $user->uid;
I have tried, to no avail, to set the radio using the following and various other suggestions:
$form['field_sem_pledge_currency']['und'][0]['value']['#value'] = '2';
$form['field_sem_pledge_currency']['und'][0]['value']['#value'] = 'currency_bitcoin';
v$form['field_sem_pledge_currency']['#default_value'] = 'currency_bitcoin';
I have searched and tried numerous other suggestions on the web with no success. Any suggestions greatly appreciated.