Autosubmitted checkbox

OK - i have this form, and i works perfect :slight_smile:

<%= form_remote_tag(:update => “status”, :url => “/image/worksafe/” + %>
<%= check_box_tag :worksafe, value = “1”, checked = image.worksafe%>
<%= submit_tag “Change status”, :name => image.sha %>
<%= end_form_tag %>

however - the submit button is kind of annoying, since you often have to
check/uncheck a lot of things at once.
So - i made this “standalone” checkbox

<%= check_box_tag :worksafe,
value = “1”,
checked = image.worksafe,
:onchange =>
:update => “status”,
:url => “/image/worksafe/” +

but the problem is - when you check/uncheck it the value “1” is never
send. This basically means that you can use the button to turn things
off, but not on :slight_smile:

I’ll hope you can help.


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