Can someone help me with a javascript which automatically selects the first value of the radio button prompt?
Hi,
You can use Default Selections in the Properties Pane of Radio Button Prompt.
Eg: 2010,2011,2012,2013 are there in Radio Button Prompt.
You can give 2010 in the Default Selections
Regards,
Pratap
Quote from: knip on 13 Mar 2018 09:10:28 PM
Can someone help me with a javascript which automatically selects the first value of the radio button prompt?
<form><div>
<input type="radio" name="Parameter1"
name="Year" value="2010" checked>
</div>
</form>
Regards,
Pratap
But what would you need in a variable list of values? Say for example you were going to limit the radio button prompt to be the last ten years...how would you select the first value regardless of what year it was?
Hi,
This have to work...
<script type = "text/javascript">
var fW =(typeof getFormWarpRequest == "function"? getFormWarpRequest() : document.forms["formWarpReguest"]);
if (fW)
{
if (fW._oLstChoicesMyList.length >= 1)
{
fW._oLstChoicesMyList.selectedIndex = 0;
}
}
</script>
Name the Miscellaneous to MyList.
Regards,
Pratap