Help with radio buttons

I need some general help with radio buttons. Here is what I want to do:

I need two radio buttons which correspond to a tinyint column in the
DB. I want the radio buttons to be pre-selected to the DB value. When a
user changes the selection, I want the changes reflected in the DB
without clicking on any buttons.

I have found in_place_control plugin but can’t figure out how to use
it/install it. I can create the buttons - but they are not pre-selected
and I am not sure how to do the update.

Help is much appreciated - code examples are great. I have the books
and have read the api - so if that is your advice don’t bother.

If you use the check_box helper, the default value (set in the database
itself) should be selected on new records, and the actual value if it’s
an existing record.

OK - but when a user makes a selection I want the value reflected in
the DB with out forcing the user to then click a button. I have read up
on observe field - but my understanding is that it does not work with
radio buttons. Any suggestions?

Thanks, K

On Jan 20, 5:35 am, “[email protected]

Kim wrote:

itself) should be selected on new records, and the actual value if it’s

I have found in_place_control plugin but can’t figure out how to use
it/install it. I can create the buttons - but they are not pre-selected
and I am not sure how to do the update.

Help is much appreciated - code examples are great. I have the books
and have read the api - so if that is your advice don’t bother.

Add on ‘onClick’ helper that fires off a remote_function call that
updates the database.

_Kevin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs