search for: label_tag

Displaying 16 results from an estimated 16 matches for "label_tag".

2006 Apr 06
0
FormBuilder-friendly labels?
...e name of the instance variable constantly. Is there a better way to do this than the snippet below, or do I need to do a little extension to the FormBuilder itself? <% form_for :long_example_name, @long_example_name, :url => { :action => :new } do |f| %> <%= label_tag "long_example_name[some_attribute]", "Some Attribute:" %> <%= f.text_field :some_attribute %> <%= label_tag "long_example_name[some_other_attribute]", "Some Other Attribute:" %> <%= f.text_field :some_other_attribute %>...
2009 Apr 12
3
Multi-button form
...troller: <% form_tag({:controller => controller_name, :action => ''index''}, {:method => :get, :class => ''form''}) do %> <div class="columns"> <div class="column left"> <p> <%= label_tag :search, "Search by: " %> <%= select_tag :search_by, options_for_select(a, params[:search_by]) %> <%= text_field_tag :search, params[:search] %> <%= submit_tag " Search", :name => ''search_button'' %>...
2012 Oct 13
2
How to include html tag inside rails label tag
Hello pls help me, below is my code <label style="width:175px;text_align:left;float:left;font-weight:bold;font-size:13px;">Group <font size="1" color="red">*</font></label> How to write this html code inside label_tag of rails ???? am clear till <font size="1" color="red">*</font>... label_tag ''Group'',nil,:style=>''width:175px;text_align:left;float:left;font-weight:bold;font-size:13px;'' My problem is how to include <font size="1&quo...
2011 May 30
5
rails habtm checkboxes with jquerymobile
Hi guys, I have a habtm association working properly. My application consists of both a desktop and a mobile version. My mobile version is made with jquerymobile and I would like my checkboxes in the edit form to look like the checkboxes shown in http://jquerymobile.com/demos/1.0a4.1/#docs/forms/forms-checkboxes.html. My desktop code is the following: <%= check_box_tag
2012 Jan 18
4
Adding a custom select to omniauth register form
...sence_of :role def self.from_omniauth(auth) ... end def self.create_with_omniauth(auth) ... end end Here''s a snippet of my view from identities/new.html.erb: <%= form_tag "/auth/identity/register" do %> … <div class="field"> <%= label_tag :role %><br> <%= select :user, :role, User::ROLES %> </div> When I try and test the registration process I get the error message: Validation failed: Role can''t be blank The parameters are: {"utf8"=>"✓", "authenticity_token"=>&...
2012 Aug 13
9
Using Jquery plugin "tokenInput" with rails
...en-fields but have been struggling with it for a while. Following is the code I use in my view <%= form_tag({:action => ''show'', :id => @contact_tokens}, :remote => true, > :method=> :get) do %> > <div id="search"> > <%= label_tag "contact_tokens" %> > <%= text_field_tag "contact_tokens", @contact_tokens %> > </div> > > <div class="action"> > <%= submit_tag "Show Details" %> > </div> > <% end %> &gt...
2008 Dec 18
0
A question about text_field_tag value
This is my rails code: <%= label_tag ''user_name_label'', ''User Name:'' %> <%= text_field_tag ''user_name'', ''''%> <%= label_tag ''view_name_label'', ''View Name:''%> <%= text_field_tag ''view_name'', ...
2010 Jan 26
2
accepts_nested_attributes_for :has_many :through => 'bug?'
...has_many :company_users has_many :users, :through => :company_users end -------------- company_user.rb class CompanyUser < ActiveRecord::Base belongs_to :user belongs_to :company end -------------- My form <% form_for :user, :url => users_path do |f| -%> <p><%= label_tag ''First name'' %> <%= f.text_field :firstname %></p> <p><%= label_tag ''Surname'' %> <%= f.text_field :surname %></p> <p><%= label_tag ''email'' %> <%= f.text_field :email %></p> <p&...
2011 Mar 08
1
form_tag for search bar with Rails 3.0.5
..., but usually end up with either an error or a submission to the index action, rather than the show action. Currently, I have the following in my index.html.haml: = form_tag({:controller => ''assets'', :action => ''show''}, :method => :GET) do .field =label_tag(''Job Number'').titleize %br/ =number_field_tag :id .actions =submit_tag ''Search'', :name => nil This gives me the following error: No route matches {:controller=>"assets", :action=>"show"} $ rake routes | fgrep asset...
2010 Oct 11
0
Converting observe_field to UJS in Rails 3
...ter"><font color="blue"><b>Just type the word or part of the word and wait two seconds</b></font></p><br/> <% if params[:area] != nil%> <% form_tag({:action => "foo"},{:id => "search"}) do %> <%= label_tag(:query, "Search for:") %> <%= text_field_tag("query", params[:query], :autocomplete => "off" , :onKeyPress=>"return disableEnterKey(event)") %> <% end %> <%= observe_field ''query'', :frequency => 2,...
2010 Oct 18
0
Ajax call-request.xhr? = false Rails 3
I have the following tag in a view:- <%= form_tag url_for({:controller => params[:area], :action => :search, :area => params[:area] }), :method => :get, :remote => true do %> <%= label_tag(:query, "Search for:") %> <%= text_field_tag("query", params[:query], :autocomplete => "off", :onKeyPress=>"return disableEnterKey(event)") %> <%= submit_tag("Search", :name => nil, ) %> On reaching the controll...
2010 Dec 22
1
nested attributes form
...atabase. But when I am on the edit action the nested attributes fields are empty... and I am using the same partial for the form. Am I missing something? Why I don''t get the nested fields displayed? <% form.fields_for :address do |address| %> <% field do %> <%= label_tag "advert_address_address", t(:address, :scope => [:activerecord, :attributes, :address]), :class => :label %> <%= address.text_field :address %> <%= address.hidden_field :lat %> <%= address.hidden_field :lng %> <% end %> <% end %...
2011 May 05
1
Array params in form_tag
Hello i have a lot of time trying to figure this out. I am having problem sending array params with form_tag :remote=>true form.erb <%#= form_tag reporte_client_reports_path do%> <%= form_tag reporte_client_reports_path,:remote=>true do%> <p> <%= label_tag :cuts %> <%= select_tag "cuts[]", options_from_collection_for_select(@cuts, "real_cut", "cut"), :multiple=>true, :id => "cuts"%> </p> <p> <%= submit_tag ''Send'' %> </p> <%end%> Contro...
2010 Aug 25
2
[PATCH] Virtio support
...v class="vm_network_config_virtio"> + <%= hidden_field_tag "virtio[#{i}]", "0" %> + <%= check_box_tag "virtio[#{i}]", "1", @nics[i].virtio, :id => "vm_network_config_virtio_#{i}" %> + <%= label_tag "vm_network_config_virtio_#{i}", "Use virtio" %> + </div> + <% if i != 0 %> <div id="vm_network_config_remove_<%= i %>" class="vm_network_config_remove"> Remove @@ -113...
2009 Feb 15
2
text_area_tag not escaping content by default
...config options, etc. I''m guessing there''s quite a few people using text_area_tag and assuming the content is being safely escaped by default. And every one of them is an XSS problem. It''s an issue with anything that uses content_tag, of course. Try this, for example: label_tag ''foo'', "</lable><script>alert(''xss2'')</script>" At the very least, are we amendable to adding a note in the FormTagHelper docs about the escaping rules? --~--~---------~--~----~------------~-------~--~----~ You received this message b...
2010 Sep 21
1
[PATCH] Introduce ability to select any kind of nic model, not just default or virtio.
...v class="vm_network_config_virtio"> - <%= hidden_field_tag "virtio[#{i}]", "0" %> - <%= check_box_tag "virtio[#{i}]", "1", @nics[i].virtio, :id => "vm_network_config_virtio_#{i}" %> - <%= label_tag "vm_network_config_virtio_#{i}", "Use virtio" %> + <div class="vm_network_config_ip"> + &nbsp; </div> <% if i != 0 %> @@ -196,7 +199,7 @@ ${htmlList(pools, id)} jnic.name...