Skip to main content
Inspiring
July 30, 2006
Answered

dynamic radio buttons

  • July 30, 2006
  • 2 replies
  • 277 views
Hope someone can help with this - I have a mySQL table whereby clients can check 8 categories of job they're interested in, amongst the rest of their details.

I have the different categories set as Bool type in mySQL, and want to display the details on a web page - with a radio button indicating which of the categories they're interested in. I had thought it would be a case of selcting the radio button, and clicking on 'live data' in the properties and selecting the field from the recordset you want to tie it to, eg :

<?php $row_Recordset1['Category1'] ?>

The idea being that if the category was selected, or equal to 1, the button would be checked, and if not selected, or equal to 0, then the button would be unchecked

But doesn't seem to be working - but presumably it's possible?

Cheers,
Iain
This topic has been closed for replies.
Correct answer johngordon12
Scratch that - it's checkboxes I needed to use, not radio buttons.

Iain

2 replies

johngordon12AuthorCorrect answer
Inspiring
July 30, 2006
Scratch that - it's checkboxes I needed to use, not radio buttons.

Iain
Inspiring
July 30, 2006
Iain71 wrote:
> Hope someone can help with this - I have a mySQL table whereby clients can
> check 8 categories of job they're interested in, amongst the rest of their
> details.
>
> I have the different categories set as Bool type in mySQL, and want to display
> the details on a web page - with a radio button indicating which of the
> categories they're interested in.

Radio buttons must be in exclusive groups, and represent a single choice
of many. To allow multiple choices, you need to use check boxes instead.

> I had thought it would be a case of selcting
> the radio button, and clicking on 'live data' in the properties and selecting
> the field from the recordset you want to tie it to, eg :
>
> <?php $row_Recordset1['Category1'] ?>

That's exactly what you do, except it's not called 'live data'. Higlight
the check box in Design view, and then select the Dynamic button in the
Property inspector. In the dialog box that opens, click the lightning
bolt to the right of the "Check if" field, and select the recordset
value. Then enter the value you want in the "Equal to" field.

--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/