similar to: Automatically Filling in form field tags

Displaying 20 results from an estimated 9000 matches similar to: "Automatically Filling in form field tags"

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 Feb 19
3
Is there a ''right'' way to do _tag field validation?
I''m reading the Ruby on Rails book by the pragmatic programmers, and it has a brief section on using the _tag input fields (text_field_tag, etc) to collect form data for fields that don''t represent fields in a model. They do validation manually in the controller, which seems really clunky. Is there any way to normalize the form validation between model input fields and non-model
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 May 14
3
need help for simple form tag (noob)
when the user click on "Search" I would like it to point to http://curentpage/?filter=searchtext (the filtering code is already written) it would look like this: <%= start_form_tag(url_for_options = {<something>}) %> <%=text_field (<my_filter>) %> <%= submit_tag(value = "Search")%> any idea how to do this? thanx in advance
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"%>
2008 Feb 13
2
javascript pop window from form how to update field back to main form
Hi I have question where I run web form. Now on this form I have one field with link select user. This link will pop up new window with javascript and on this window I have form with items which end user can select. Once selection is done end user press button Select User. Now I need to close that javascipt window and send back value of that selection back to form and to the field which has
2006 Jun 30
5
If / Else Form layout question.
Hello all, I''m using the following _form.rhtml layout for a number of pages, including edit record and new record (which each has it''s own definition in the controller). I''d like to display a different author form field depending on which page they are using. I''d rather keep using _form.rhtml as a layout template, instead of customizing each separate page.
2006 Apr 28
1
beginner - default form values
I want to build a simple calculator with 1 form and a results page. The form will be redisplayed with an error message upon an invalid value entered. I won''t be using any database/active record for this. The problem i have is when i return to the form page i want to redisplay the values already entered in the form fields. Should i use text_field (which seems to be tied to a model) or
2006 Feb 04
1
Error when using form helper and child objects
Hi, This is one problem that has gotten me stumped for quite a while. I have an Item that has_many :DeliveryMethod, and what I seek to achieve is to create a form that''d let me create an Item, as well as its DeliveryMethods in 1 single form. And so I tried something like: <%= text_field_tag ''Item[DeliveryMethod][price]'', @Item.DeliveryMethod ?
2011 Jul 14
2
belongs_to --- has_many should update automatically?
On p. 299 of the current Rails book it says that "Active Record takes care of saving all the dependent child rows when you save a parent row." So, when I add a row to the table that has "belongs_to" in its model, shouldn''t the table with the "has_many" be updated with data from the foreign key? If not, how do I save data from a form into more than one
2007 Dec 14
3
using the session to pass a value from form to controller
I have a form in which a bunch of new users can be created with the same password if desired. I''m trying to write the password into the session and pull it out in the controller (besides avoiding putting it into params, this also should let me keep it for repopulating the text field if the creation fails for any reason and the user gets sent back to the page with the form). As part of a
2010 Jul 26
1
form date helper with text year
I have a date where the year range is more then I want to define in a select_date scaffold generated year range. My idea was to have the year entered as a text field and the month and day using something like: <%= select_month @person.born,:prefix => :person ,:field_name => "born(2i)" %> <%= select_day @person.born,:prefix => :person , :field_name =>
2006 Jan 23
2
Multiple Row Form similar to Milestones on BaseCamp
Hi all, Wondering how to setup my view and controller to do something similar to the form on Basecamp that allows adding up to 10 milestones on one page. Thanks Phil -- Posted via http://www.ruby-forum.com/.
2006 May 23
1
Form Field Helpers... Do they need objects?
I''m trying to use the select helper but do not need to pass the values back to an object because this is just used as a param value. Everywhere I''ve looked I see that the form field helpers require an object name. I''ve tried omitting the name but I get an error telling me I have two few paramaters. (2 out of 3) Other than typing out the HTML myself (because the
2020 Jun 02
3
Samba vs Windows - File sharing in a domain setting
I've been working with Samba in an AD domain setting for several years now. Small potatoes, nothing fancy. A few months ago, I came across the limitation of Samba, in comparison to file sharing from a Windows server, that, at the current moment, it doesn't offer an indexing service that is compatible with Windows Search. So, no matter how much I like Samba, if I need this feature, I have
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 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.tinfors@mac.com Skype: jtinfors
2005 Nov 09
3
AJAX form Parameters jumbled.
Sorry for the repost but I originally posted this as a response to another thread. I have a text field called ''phrase'' but the parameter values always come up as nil and when I check the parameters dumped in the error message I do not get the normal hash you''d expect. Instead of something like {"phrase"=>"jim"} I get:
2010 Oct 19
3
Our success story with samba4
Hi all, This message is a testament to the great work samba team has done, but its also an encouragement to those of you that still not sure if samba4 will work in your environment. This semester we have moved from samba 3.0.X DC to samba4 DC for students, and things are working great The move was predominantly driven by switching from Windows XP to Windows 7 desktop platform (but also by a
2008 May 28
3
Newbie: Searcing database via user form input?
Does anyone have a tutorial on adding new parameters to the paramaters list and then creating find conditions around them? I''m wondering how I can get my index page to list only the items where some of the the databases fields match user form input. index.html.erb would be calling itself with a new parameter :searchdata So far the index.html.erb has... <% form_tag({ :action =>