ruby - Handle a selected value in rails (before submit) -
i'm new in rails , want retrieve selected value field in order adapt other field in same form.
<% if @issue.safe_attribute? 'tracker_id' %> <p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true}, :onchange => "updateissuefrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> <% end %> <% if @issue.safe_attribute? 'parent_issue_id' %> <p id="parent_issue"><%= f.text_field :parent_issue_id, :size => 10, :required => @issue.required_parent_issue_id?(*the tracker_id selected*) %></p> <% end %>
how handle value the tracker_id selected ?
ruby-on-rails ruby ruby-on-rails-3 redmine
No comments:
Post a Comment