I have a search box based on the entered date.
The problem is that when I submit the form, the search results go well, but the search bar disappears from the field when the page reloads.
Can someone tell me how to save the search string in a field.
I am using the ruby โโform, and below is the code.
<%=form_for :messages, url: url_for( :controller => :time_sheets, :action => :late ), :html => { :id => "submitForm1" } do |f| %> <div class="field"> <tr> <td> From Date <%= f.text_field :leaveFrom, :id => 'datepicker2', :class => 'phcolor','data-validation' =>'required', :readonly => true %></td> <td> To Date <%= f.text_field :leaveTo, :id => 'datepicker7', :class => 'phcolor', :readonly => true %></td> <td >Late Time<%= f.text_field :on_duty, :id => 'timepicker5' %></td> <div class="actions"> <td style="position: absolute;right: 178px;"><input type="button" class="btn btn-primary" id="submitid" tabindex="7" value="Go"></td> </div> </tr> </div> <% end %>
yaswant singh
source share