<?php
    /*===
        function: choose_widget: void -> void
        purpose: expects nothing,
            outputs a form requesting a user's widget preference
            (drop-down or radio buttons),
            and returns nothing.

        last modified: 2024-04-15
    ===*/

    function choose_widget()
    {
       ?>
        <form method="post"
              action="<?= htmlentities($_SERVER['PHP_SELF'],
                                       ENT_QUOTES) ?>">
            <fieldset>
                <fieldset>
                    <legend> Preference for department selection: </legend>

                    <input type="radio" name="widg_choice"
                           value="select" id="select" checked="checked" />
                    <label for="select"> Select/Drop-Down Box </label> <br />

                    <input type="radio" name="widg_choice"
                           value="radio" id="radio" />
                    <label for="radio"> Radio Buttons </label> <br />
                </fieldset>

                <div class="sub">
                    <input type="submit" value="Submit" />
                </div>
            </fieldset>
        </form>
        <?php
    }
?>