search for: text_field_tag

Displaying 20 results from an estimated 227 matches for "text_field_tag".

2006 Jul 30
1
Insert multiple new child records with the parent
...> ''100''}, {''description'' => ''line b'', ''cost'' => ''200''}]. I can''t find the correct naming convention for the textboxes to produce this data structure in the controller. I have tried: <%= text_field_tag("line_items[0][description]") %> <%= text_field_tag("line_items[0][cost]") %> <%= text_field_tag("line_items[1][description]") %> <%= text_field_tag("line_items[1][cost]") %> which results in a hash of hashes: "invoice_default"...
2006 May 10
3
text_field_tag options
Hi all, can someone explain to me how the options for helper text_field_tag supposed to be written. I really tried a bunch of stuff without success. For example I need a field with id "query", so I write <%= text_field_tag :query %> which works fine. But what if I want the field only 5 characters big? I tried among other <%= text_field_tag :q...
2006 Jun 02
4
Creating an array of params
I''ve got a bunch of text fields that I''d like to access as an array. The code looks like this: <%= text_field_tag "people[0][entry]" %> <%= text_field_tag "people[1][entry]" %> <%= text_field_tag "people[2][entry]" %> So when I submit the form, I''d like to be able to use it like params[:people].each {|p| p[:entry]} However when I submit it, it can'...
2006 Mar 08
3
List and update values from text_field_tag fields
Hi, I populate a couple of text_field_tag''s with data from an AciveRecord object. Some fields are editable and at the end of the page there''s a submit button. I want the new values to be updated in the DB but by default my original values are stored again. How do i go about doing this? thanks/jens AIM: jens.tinfor...
2009 Feb 24
1
How do I clear values from text_field_tag after browser refresh????
Hi all, I''m having an issue with text_field_tag. I want to reset the value of the text_field when I refresh my browser, seems like a very simple thing, however I''m having hard time finding the answer. After I input some values, how do i reset the value to nil or empty?? my code is below <%= text_field_tag ''login'...
2009 Mar 12
4
How can I append a text_field_tag to a form_for?
Hello people, how can I append a text_field_tag to a form_for? When I submit the form all text_field_tags are not being appended to the params... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk&quo...
2008 Feb 20
1
text_field_tag - different parameter name
...;%= number_with_delimiter(product.price, " ")%> Kč</ div> <%= link_to "Details", {:action => "product", :id => product.name_seo} %> <% form_tag :action => "add_to_cart" do %> <p> <%= text_field_tag :quantity, "1", :size => 1 %> <%= submit_tag "Buy" %> </p> <% end %> </div> <% end %> In controller I need get value of text_field_tag (@value = params[:quantity] ) Problem is with validation : ID "quan...
2009 Apr 17
2
how to call javascript function in text_field_tag
Dear all Sorry for dummy question. How can I convert a text input in form to upper case letter in view? Can I call the javascript function toUpperCase() in text_field_tag?? <%= text_field_tag(:sometext, nil, :size => 14) %> I know I can achieve this using params[:sometext].upcase in controller, but I want to do this in view. Any ideas? Many thanks Valentino -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ Y...
2006 Mar 15
7
Populating text_tag with serialized data
I am using a serialized attribute in one of my models The serialized data is in the form of an array. I want to have a text_tag for each element contained in my serialized attribute. How would I construct the text_tag? My model name is ''questions''. The serialized attribute is "answers" So I might have: <% form tag %> <% text_tag ''question'',
2006 Mar 10
1
text_field_tag html class
Hello, how could I define class for input textfield, text_field_tag(''somefieldname'',nil,:class => ''txt'') doesn''t work ? :( Marius Zilenas -- Posted via http://www.ruby-forum.com/.
2008 Feb 05
1
How to set text in text_field_tag???????
Simple problem but I can''t find a solution. I have this tag: <%=text_field_tag("query", params[:query], :autocomplete => "off" ) %> Its a search field box. Question: how do I update the text in the text field???? i.e is there a rails equivalent like query.setText("some text") Thanks -- Posted via http://www.ruby-forum.com/. --~--~-----...
2008 Jul 13
4
How to justify text in text_field_tag
I would like to have the text in a text_field_tag right justified instead of left justified. Is there a way to do this? Thanks, Alex -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To...
2007 Oct 05
7
Trouble with text_field_tag
I am trying to implement a basic login page: login.rhtml 1 <fieldset> 2 <% form_tag do %> 3 <label for="name">Name:</label> 4 <%= text_field_tag :name, params[:name] %> 5 <label for="password">Password:</label> 6 <%= password_field_tag :password, params[:password] %> 7 <%= submit_tag "Login" %> 8 <% end %> 9 </fieldset> However, I''m getting the fol...
2008 Jan 25
2
form formatting
...e fbml elements and rails tags, is there a way to do within a fb:editor? if I do: <% facebook_form_for(:task, at task,:url => create_task_path) do |f| %> Assign Task To: <%= fb_friend_selector %> <%=f.text_field :ttype, :label=> "Title"%> <%=text_field_tag :newrnumdays, ndays, :label => "# Days"%> <%=f.buttons "Add" %> <% end %> the text_field seems to be placed nicely in the editor and formatted accordingly but the friend selector & the text_field_tag are not placed inside the editor display table a...
2006 Apr 17
6
acts_as_taggable confused
Ahoy, So i''ve installed the acts_as_taggable module and everything is fine, but i''m a bit confused about this bit of code described in the API "photo = Photo.new # splits and adds to the tags collection photo.tag "wine beer alcohol" # don''t need to split since it''s an array, but replaces the tags collection # trailing and leading
2006 Apr 20
0
Clearing text_field_tag -- Help PLEASE
...- Here''s _entry_form.rhtml --- <%= form_remote_tag(:update => ''ingredient_list'', :url => {:action => :add_ingredient}, :position => ''bottom'', :after => {:action => :clear_entry}) %> Name: <%= text_field_tag :name %> Amount: <%= text_field_tag :qty %> <%= submit_tag ''Add Ingredient'' %> <%= end_form_tag %> --- and here''s the clear_entry action in the controller ---- def clear_entry render :update do |page| page.entry.name.value = '...
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'', '''' %> I defined a user name text field and a view name text field. The view...
2006 May 19
1
pass text_field to controller when using periodically_call_r
Hi. Can anyone help with this? In a view, I have a text_field_tag( :mytextfield ). I would like to pass the current value of that text_field_tag to a periodically_call_remote - something like periodically_call_remote( :url => { :action => :do_it, :thetextval => :mytextfield.value } ) - Any idea how can I pass and/or access the value of the text_fi...
2007 Apr 22
0
Reading the contents of a text_field_tag within a form
I''m trying to do something which I think should be simple but can''t find anything after reading and searching for quite a while. I guess I''m searching using the wrong terms maybe. I''d like to read the contents of a text_field_tag within a form from within a controller function before the form is submitted. I could possibly force the submission of the form but can''t work out how to do this either. A bit more explanation with an example: Text box is empty. User clicks button, "Hello" "Hello" i...
2007 May 07
0
set cursor in text_field_tag?
Let''s say I''ve text_field_tag A and B. I type something in A and hit the tabulator-key. An observe_field- helper-method gets triggered, some fancy Ajax-JS-stuff happens, the formerly disabled field B gets enabled and now I''m able to type into textfield B. No, how can I say with JS/Prototype/Railshelpers that I'...