I have been using Direct Row Editing successfully with a two item radio button. Selecting the appropriate button correctly updates the underlying database value as expected.
The only problem I am having is how to get the correct radio buttons to be initialized to the existing data value.
Is there an example that shows how I can do this? I am not able to find anything in the forums.
Here is the Field code I am using:
I have tried adding PHP code to set "checked", but that does not seem to work and is not being interpreted with in the Field entry.
How can I get the radio buttons to be initialized to the underlying data value?
The only problem I am having is how to get the correct radio buttons to be initialized to the existing data value.
Is there an example that shows how I can do this? I am not able to find anything in the forums.
Here is the Field code I am using:
entrant.boat_type:<input type="radio" name="entrant[{entrant.id}][boat_type]" id="boat_typeP" value="P">Power</input><br/><input type="radio" name="entrant[{entrant.id}][boat_type]" id="boat_typeS" value="S">Sail</input>
I have tried adding PHP code to set "checked", but that does not seem to work and is not being interpreted with in the Field entry.
How can I get the radio buttons to be initialized to the underlying data value?