jeudi 17 février 2022

how to get the check box value in rails

im having a form check box, and i need to do some calculations before submiting the form based on the check box checked but im not sure how to fetch the check box value in rails

this is my code

<%= form.check_box 'active', :class => "icheck", :"data-checkbox" => "icheckbox_square-blue" %>

<%= form.label 'active', 'library_books' %>

before submitting the form i need to do some calculations based on the form checkbox value

so how to check whether the form is checked or not in rails




Aucun commentaire:

Enregistrer un commentaire