similar to: text_field

Displaying 20 results from an estimated 6000 matches similar to: "text_field"

2006 Jul 13
4
Does text_field go directly to attributes hash in AR object?
All, I''m having a hell of a time figuring out what is going on here. I''m trying to override one of my getters so that I can format it a certain way in my form. But I can''t seem to get text_field to call the appropriate method on my object. So here''s my getter: public def FAX fax = read_attribute(:FAX) puts fax
2006 Apr 08
7
text_field and arrays
Hi, I''m trying to do a bulk update on an array with the helper text_field. I''m trying to create an inputfield for every object in the array, but I''m not getting it right... example: class ClassA @arrayB[] end HTML (code with error): <% 0.upto(9) do |index| %> <%= text_field ''ClassA'', ''arrayB[index]'' %> non
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_field_tag in my do_it controller?
2006 Feb 25
2
How to access param entered through text_field
I''m rendering partial a form comprising several text_field helpers to maintain my User model. For example, the email field is: <p><label for="user_email">Email</label><br/> <%= text_field ''user'', ''email'', :size => ''40'', :maxsize => ''256'' %></p> In my controller,
2006 Aug 18
3
setting a value of text_field from a controller
Hi, I need to set up an initial value from controller. In my views I''ve something like <%= text_field "object", "name" %> and would like to do something like this from controller def index @object[:name] = ''default value'' end but still got an error. Object doesn''t have database model (and will not have) Thank you PS: now using
2007 Jul 20
4
the value in text_field helper
I have been working on this small, minute, part on my project and it all hinges on setting the value in a text_field helper. Saying: <%= text_field ''user'', ''company'', :value => @login %> does not do it. When I go and look at the raw html, there is no value there and "value" is an attribute of the input tag, im pretty sure. I really like
2009 Jun 08
1
why can't I add a :class to text_field?
<%= text_field_tag ''login'' ,nil, {:class => ''line''} %> the old way work. <%= f.text_field :login, :class => ''line'' %> but why this doesn''t. -- Posted via http://www.ruby-forum.com/.
2011 Nov 02
3
form_for text_field
I have a form ... html ..... <% form_for @person do |f| %> ... html ..... <%= f.text_field :last_name %> ... html ..... <% end %> When last_name field of @person doesn''t contains french special symbols like ''é'', all characters are displayed in the input control (f.text_field :last_name ). Else only symbols before french special symbol are
2008 Jan 25
2
form formatting
If I want to use 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"%>
2006 Apr 08
2
ActionView::Helpers::FormHelper instance methods should take an object reference rather than an object_name.
Hi ActionView::Helpers::FormHelper methods (e.g. #text_field, #check_box...) take object_name as an argument. From this argument they infer a name that is supposed to contains the reference to the relevant object. I can''t see why the FormHelper methods were designed that way. Compared to simply passing them a reference, the current way seems too complicated and an invitation to problems
2006 Jul 21
1
How to dynamically add more rows and submit data
Let''s assume that I am trying to build an application where the user can enter invoice. In the app the user can add lines items. Each line item has decription, date, rate and hours. When the invoice screen comes up the first time I have one blank row for the line items. <tr> <th>Description</th> <th>Date</th>
2006 Apr 08
1
text_field behaviour with validations
Hi, The text_field method sets the class of the field to "invalid" when the object you specified is invalid (when using validations). This is to facilitate working with validations. Is there anything else it does? In a certain non-standard situation I''m forced to use text_field_tag, instead of text_field. This means I have to take care of the validations myself as well.
2006 Apr 25
2
Noob Question: REgarding Forms ( Take 2 )
I''m hoping there''s an easy way to do this. I''m trying to read options from a database, and insert them into form tags. So for example, In the Database Table: options size: 300 type: text_field maxsize: 300 and I want to create a text_field form tag, with all the appropriate options, is there an easy way to do this, other than having the code output the HTML
2006 Jan 13
5
Form field naming semantics question
Hi, I have a question today regarding how the various form elements in _form.rhtml are named. I understand that for a database table "persons" with a column headed by "name", then in _form.rhtml it will probably be like: <p><label for="person_name">Name><br/> <%= text_field ''person'', ''name''
2006 Apr 06
3
Inserting parent_id
I have two tables: - projects - lines lines has a foreign key constraint to projects.id When I''m creating a new line object, the database fails on insert with the following error: "PGError: ERROR: null value in column "project_id" violates not-null constraint" My code looks like this: def create_lines @project = params[:id] @line =
2006 Jun 13
2
Custom Primary Key, Using Primary Key in Form "gives before_type_cast" error?
Hi guys, I''ve got a problem here which i need help from the pro''s in this mailing list I have a legacy app where the User table has a custom structure where "User_id" (username) is the primary key as well as the username used to log in User.rb (model) class User < ActiveRecord::Base set_table_name "cmf901" set_primary_key "user_id" end
2006 Jul 18
2
A quick question on forms
I want to change parts of this form in order to use default values (with a disabled input). The problem is if I change it from text_field to text_field_tag that part of the form stops functioning. It seems like a silly question, but its been driving me crazy. Any help would help. Steve. <%= error_messages_for ''post'' %> <!--[form:post]--> <p><label
2006 Apr 17
2
Refreshing RHTML page with previously posted data?
All, After a POST, I want to be able to redisplay a view with the data that was previously entered when my controller action notices a validation failure and calls render on the view that does the submit. Example: View x.rhtml - text field is filled in Call controller action Controller action fails validation calls render (:action => ''x'') x.rthml shows up with blank text
2005 Dec 01
2
View helpers and nested attributes
Hello all, I have a model with two entities (document and asset) and a 1:1 relationship defined between them (every model has an asset). I want to generate a rthml view that generates a hash for document attributes and a nested hash for asset attributes (for example {:document =>{:name=>XXX :asset => {date =>XXX}}) According to the Pragmatic Programmers book (page 355), the input
2020 Sep 01
2
about header address parsing
Hi, Is this expected or not? From: user1 at fuga.example.com <user1 at example.com> To: user2 at hoge.example.com <user2 at example.com> ? a uid fetch 43055 (envelope) * 1860 FETCH (UID 43055 ENVELOPE ("Thu, 30 Jul 2020 13:52:59 +0900" "test1" ((NIL NIL "user1" "fuga.example.com")) ((NIL NIL "user1" "fuga.example.com"))