I have one doubt.I want when user will scan one bar code its value will fetch to one text field within one form.As soon as the bar code value will display on text-field that form should submit using Rails 3.I am explaining some codes below please help me to make it successfully.
views/homes/index.html.erb
<%= form_for :hcsy,:url => {:action =>'scan_hcsy' } do |f| %>
<%= f.text_field :reciept,placeholder:"Get your scan code"' %>
<% end %>
controller/homes_controller.rb
class HomesController < ApplicationController
def index
end
def scan_hcsy
end
end
Inside scan_hcsy action i will do some back-end application.Here only i need as soon as the text field will have the bar code value this form should submit.Please help me.
Aucun commentaire:
Enregistrer un commentaire