search for: formhelpers

Displaying 20 results from an estimated 73 matches for "formhelpers".

Did you mean: formhelper
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 Jun 18
0
Framework question about FormHelper ...
Hello, I don''t understand how formhelper works (In a Framework point of view) ... For example if I use the chek_box formhelper 1/ check_box("puppy", "gooddog", {}, "yes", "no") will call @puppy.gooddog BUT, how it is possible since the check_box has only a string parameters not instance object ? 2/ if you create your own helper which generate
2005 Dec 19
0
ActionView::Helpers::FormHelper.text_field
Hi, Is it possible to use the ActionView::Helpers::FormHelper.text_field with an instance variable instead of a model. e.g. In the controller: def meth @value = ''hi there'' end In view: <%= text_field ''value'', nil %> It doesn''t work with what is above (doesn''t like the nil) and produces very strange results replacing nil with
2006 Jun 02
3
Advice, why value_before_type_cast in FormHelper?
I am wondering why is in creating text fields with form_helper used value_before_type_cast instead of attribute value for field value? I set rails enviroment so date fields are in european format (dd.mm.yyyy) and would like to have same format in forms, but because of value_before_type_cast is called, form fields are filled with ''yyyy-mm-dd'' or timestamp integer, etc.
2006 Feb 21
1
formhelper methods don''t work with render collection partials
I''m rendering a partial using a collection: <%=render(:partial=> ''record'', :collection => @records)%> Inside the partial, I''m attempting to create a new form for each row, generating elements like the following example: <%= text_field "record", "name" %> However, though my objects are fully populated, these form tags
2010 Feb 20
1
formhelper password_field only takes two arguments
When I look at the docs, password_field seems to take 3 arguments. So when I ''play around" with things and I attempt to pass three arguments to password_field ... I get an error saying that it only takes two parameters ("3 for 2") I am totally lost. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups
2006 Jan 21
1
text_area content with text_area and not text_area_tag ?
Hello, Is it possible to fill the textarea content when using the text_area function ? Why there is 2 , + or - similar class : FormHelper and FormTagHelper ?
2006 Apr 04
4
Anyone noticed slow rendering performance with formhelpers?
It seems like the form helpers, such as "link_to" and "check_box" really slows down rendering when you have hundreds of rows. Has anyone else noticed this?? Is there a way to go around it apart from typing the raw html? -- Posted via http://www.ruby-forum.com/.
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class attribute and array: (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector| -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2010 Mar 20
4
Displaying an image in a Rails form_for
Hi, I''ve got a public\images\DownArrow.jpg and app\views\expenses\new.html.erb that want to present this image in the following context: <p> <%= f.label :vendor %><br /> <%= f.text_field :vendor %> <%= f.image "DownArrow.jpg" %> <br> <%= select_tag "test", options_for_select(@current_vendors.collect {
2007 Apr 09
4
How do i switch off error wrapping for a specific field?
Hi, i have some issues with the default rails error wrapping. It wraps errors in a div with class ''fieldsWithError'', which is not good practice in my eyes. Adding a class ''error'' to the field would be much nicer. My solution to the problem: build your own FormBuilder. Funny enough, i found no (nice) possibility to switch error wrapping off while using the
2006 Aug 01
6
Newbie: How to use text_field with Java Script
<input type="text" name="date1" id="dateField1" onchange="magicDate(''dateField1'');" onfocus="if (this.className != ''error'') this.select()" /> How could I generate above text filed using ruby? I am not sure how to give the options such as onchange, onfocus, id and so on? could some one please help. --
2006 Jul 05
1
Setting a HTML ID with form_tag / form_remote_tag
Hello, Is it possible to specify a HTML ID with the form_tag / form_remote_tag methods of the FormHelper? I specifically need this for javascript and css but can''t seem to find how to do it in the APIs. Cheers, Paul Shannon Web Applications Developer Codeweavers Limited -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jul 05
1
Prototype Based Validation with form_remote_tag
Hello, I am attempting to use validation.js from http://tetlaw.id.au/view/blog/really-easy-field-validation-with-prototyp e/ with form_remote_tag. The rails form helper binds the needed Ajax.Updater to the onSubmit action of the form. The validation.js also attempts to bind to the onSubmit of the form. The logic that is needed is if( valid.validate() ) { ...Ajax.Updater... } where valid
2006 Jan 10
0
Changing scaffold''s text_field to a password_field causes white screen of death in mozilla?
I had posted earlier about ''silent failure of a controller'', what seemed to be an intractable problem where I was getting failure of a particular action in a controller while others worked. What was irritating was that there were no useful messages. Nothing to the browser, nothing in logs, and even the breakpoints wouldn''t hit. Finally by a process of elemination I found
2005 Dec 27
2
Rewriting FormBuilder
Hi, I want to extend formbuilder to make it output a lable (I know about labeled_form_helper made by technoweenie), my own formating, and a couple of extra tags inside the form attribute. I was easily able to extend form_remote_to. But when I continue to adjust the way elements are handled I don''t know how to continue. I can''t find the method text_field thats should is
2005 Mar 07
2
radio_button helper and "checked" option
Does anyone know how to get the radio_button helper to set the html "checked" option? Thanks, Curt
2006 Jun 12
3
Multiple Form Fields with Same Model?
Hello, I''m trying to create a form that will allow a user to submit a list of phone numbers, but the list is dynamically created. Thus allowing my form to submit an unknown number of phone numbers. Here is some of the code I have been trying: <%= collection_select( "phone[]", "phone_type_id", PhoneType.find(:all, :order => "position"),
2006 Jun 26
2
How can I sort options in a select box?
Pretty much a newbie here, looking for help on select boxes in forms.... Is there any way in the view to sort the options of a drop-down select box? My current code (within a larger _form.rhtml file) is: <div class="form-element"> <label for="asset_location_id">Location</label> <%= select ''asset'', ''location_id'',
2006 Apr 25
3
select boxe
yop, http://rubyonrails.org/api/classes/ActionView/Helpers/FormHelper.html ici j''ai vu qu''on pouvait g?n?rer des ?l?ment d''un formulaire gr?ce des m?thodes. Apres quelque petite recherches j''ai trouv? comment g?n?rer un select <%= select(''category'', ''category.id'', Category.find_all.collect {|category| category.nom})