Fastes way to detect if a radio button has been selected

There are times when you just need to pull the default value of a radio button selection, rather than creating and array and testing from it.

The quick and dirty solution is to place a hidden field right before those items you want to send with default values if nothing is selected.

PHP:
  1. <input type="hidden" name="NameOfYourRadio" value="Default Value"/>

Leave a Reply