in reply to Variable variable names

OFF TOPIC:

I'm curious how you decide whether something should be a radio button (or a pulldown, etc). I'm working on something where I would possibly need similar functionality, and although I'm not sure how much chance there is with yours that something could be a pulldown or a multiple select or whatnot (i.e. how sure are you of the databases structure), that's the challenge I'm facing. If you are doing anything close to this, how? Also, how much "prettying up" are you doing? For instance, you have names for the columns, do you simply use that name when you display it in html?

Replies are listed 'Best First'.
RE: OT: Re: Variable variable names
by cei (Monk) on Oct 24, 2000 at 04:47 UTC
    For me, I think in the following way: if a question has only one answer, with few choices, a Radio Button is best. If you only want one item, but the list of choices may grow over time, a pull-down may be best. If you want a bit of info that is in no way dependent on other info, checkboxes are the answer.

    Some things make themselves more obvious. Things like multiple choice questions, with potentially long answers, do the answers in HTML text and put radio buttons next to them. Long questions with short answers, pull-down menues. I don't think I've ever needed to use a multiple select in anything I have created. That data could always be represented in other methods.

    As far as "prettying up" the form elements, in my current project, I assign some variables as "selected" or "checked" and then include them in the HTML form element. That way I can maintain state between calls.