Render individual radio buttons?

thread: 2 messages  |  last: a year ago  |  started: friday, april 2, 2010, 3:22 pm pdt


#1  |  meecect
Friday, April 2, 2010, 3:22 PM PDT

I might be going at this the wrong way, so whatever advice is welcome.

I have a person table and a phoneNumber table. A Person can have multiple PhoneNumbers. Now I want to mark one (and only one) of those phoneNumbers as 'preferred'. Also I would like the edit form to show radio buttons next to each phone number so that the user can select one number as preferred.

Initially, I created a column in Person called 'preferred_phone_id' which was a fk to phoneNumber.id.
The problem comes in the form rendering. I can't seem to render individual radio button items (in the same group) so I can't place the radio button of my choosing 'next' to the input fields for the relevant number and still have the toggle work. So maybe that's not the best approach.

Any ideas on the best way to do this?

thanks,

#2  |  VexedPanda (Calgary, AB) Canada
Tuesday, April 6, 2010, 8:04 AM PDT

I answered this in your qcubed post.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.