Radio button needs to be reset while refreshing
I am having two radio buttons namely users and groups.
If is select groups and refresh the browser it stays in groups itself.
When i give ctrl+f5 it's getting reset to users.
My need is:
While i click the refresh button in browser the radio button should be reset to users even it is selected as groups.
EDIT : CODE
$form['groups'] = array(
'#title' => t('Groups'),
'#type' => 'select',
'#multiple' => 3,
'#options' => $options,
);
$form['users'] = array(
'#type' => 'textfield',
'#title' => t('Users'),
'#description' => t('Separate multiple names with commas.'),
'#default_value' => '',
);
This is task developing using drupal and jquery..
Any help regarding this will be grateful and thankful...
Tha开发者_运维技巧nks in advance...
You can try this:
<html>
<head>
</head>
<body onload="clearItForm.reset();">
<form name="clearItForm">
<input type="radio" name="sweets">Ice Cream<br>
<input type="radio" name="sweets">Candy Bars<br>
<input type="radio" name="sweets">Milk Shakes<br>
</form>
</body>
</html>
An alternative to Robby Shaw's good answer is to reset the form outside of the html, in some JavaScript.
window.onload = function(){
clearItForm.reset();
}
精彩评论