similar to: How to avoid an attribute without passing it to post in formtastic

Displaying 20 results from an estimated 30000 matches similar to: "How to avoid an attribute without passing it to post in formtastic"

2011 Feb 21
1
Multiple custom CSS for Formtastic
Inside stylesheets I have formtastic.css and formtastic_changes.css. In formtastic_changes.css I have a custom with: form.formtastic { width: 700px; etc.. It is working ok but now in only one page only, need a narrower form, say 530. So I need to have two width set up. What is the best way to do this? I mean I do not want to change the other forms in the project, I just want to change the
2006 Apr 04
6
check_box_tag is limited?
Hello all. Am I going totally nuts here and just want to check (Natch!) something. A normal check_box has two value posssibilities. One for checked and one for unchecked, the value gets submitted with a form. The check_box_tag on the other hand, has a checked_value (Called just ''value'') and for the unchecked value...nothing, zip, nada. This means that if you submit a form with
2009 Oct 06
1
Problems Processing multiple form elements generated by javascript actions
Hi all, After many days of struggling, I have a multi-model form with ajax elements more or less working, but I''m hitting a wall with a few bugs that I can''t figure out. Guidance would be very much appreciated. I''m using the Ryan Bates technique from Advanced Rails recipes to dynamically add and remove elements on a multi-model form.
2006 Nov 04
0
Check_box woes
I have a User model and an Address model. A user has_many addresses, and an address belongs_to a user. An address object for a user could be a billing, shipping or marketing address. The way I''m tracking this is via the user attributes: billing_adress_id, marketing_address_id and shipping_address_id in the user table, which holds the relevant address id. But in my form that allows a
2011 Oct 05
2
formtastic / activeadmin
Newbie question: want to following code to migrate to formtastic: <% f.fields_for :assets do |asset_fields| %> <% if asset_fields.object.new_record? %> <p> <%= asset_fields.file_field :asset %> </p> <% end %> <% end %> tried this: f.inputs "Appartment Details" do f.input :assets do |asset_fields|
2006 Apr 21
0
checkbox with has_many
Hi, How do I set up a checkbox to use a record with a has_many field? For example, say I have a User which is an Active Record Model. And say it has many names. class User < ActiveRecord::Base has_many :names end class Name < ActiveRecord::Base belongs_to :user end Say I want to update this user and I want checkboxes that give a choice between different names. How would I do that?
2010 Nov 11
2
Rails 3 - Nested Forms, using Builder -- Check_box issue
Hello, I have the following: My Controller: def new . . @teammembers.each do |teammember| request = @request_thread.requests.build(:recipient_id => teammember.user_id, :full_name => ''Billy Bob T'') end My View: . . <%= f.fields_for :requests do |builder| %> <div class="field"> <%= builder.label
2009 Apr 18
3
Create CheckBox
Hai, I want to create a checkbox the values are table field values. In my controller @emptypes = Emptypes.find(:all) In View <% @emptypes.each do |c| %> #Write checkbox generating code here <%= check_box("contacts",emptypes.types)%> <%end%> Anyknows please suggest me how to create a checkbox (values are retrived from table). -with Thanking&Regards
2006 Aug 10
2
check_box form helper questions/issues
I''m using Rails 1.1.x and it looks like the check_box form helper expects me to provide and object and method so it can determine if the checkbox should be checked or not. I''m having a couple of issues with this. note: I''m using UserEngine and adding a HABTM so that: class User < ActiveRecord::Base has_and_belongs_to_many :foos end class foo <
2012 Sep 22
1
formtastic does not save at all
Rails 3.1.3 I am using Formtastic gem in order to deal with multi-select dependencies. <%= semantic_form_for(@give) do |f| %> <%= f.inputs do %> <%= f.input :departure, :collection => Departure.find(:all, :order=>:city).collect{ |c| [c.city,c.id]}, :required=>true %> <div id="destinationCity"> <%= render :partial =>
2012 Oct 31
2
What is Formtastic and SimpleForm gem ? Is any one of this is by default included in Rails ?
Hi all, I read Formtastic and SimpleForm gem. I am using 3.4 Q 1 Is any one of this is by default included in Rails ? Q2 Any advantage of this gems over simple form tags ? As per my knowledge we are using form helper , but still i raised the qustion ? Thanks Regards Fahim Babar Patel -- You received this message because you are subscribed to the Google Groups "Ruby
2006 Jan 21
5
How do you deal with non-model property form values
I have a User ActiveRecord model that has email and password properties. I want to build a login for that has a "remember me" option. My view looks like this: <% @page_title = "Login" -%> <%= error_messages_for ''user'' %> <%= form_tag %> <table> <tr> <td align="right" width="1%"
2006 Apr 24
4
javascript in RoR page - Check ALL/uncheck ALL buttons
I am trying to implement a check all and uncheck all button for my check boxes. Here is what I have below. I am getting this error each time: Error: document.myform.add_visit_for_this_Pt has no properties Source File: http://localhost:3000/AddPatientVisit/addvisits Line: 1 Strange that I can''t seem to pass value into the function. Thanks for your help! <SCRIPT
2006 Feb 05
1
Check/uncheck all checkboxes
Hello! I have this page where I list all users in a table. There is checkbox in every row. My User-model has a "checked"-attribute. I have implemented the checkboxes like this: <%= check_box("user[]", "checked") %> Which outputs this: <input id="user_12_checked" name="user[12][checked]" type="checkbox" value="1"
2006 May 11
3
multiple checkbox values, convert to string, 1 db field
Basically what I''m trying to do is create a way for users to enter "keywords" that will then be searchable. I.e., when a user creates a new Item, there is also a keywords field in the database that is a string like "purple triangle free" -- but all the user sees when they are creating the keywords is a series of checkboxes like: __blue __red __purple __circle
2006 Jul 18
1
updating boolean field in model from check box value
hello i am having a bit of trouble with updating the values of a boolean field in my database/model given the value returned by a check box i am generating the check box as follows: check_box("user", "enabled") which produces <input checked="checked" id="user_enabled" name="user[enabled]" type="checkbox" value="1"
2006 Feb 25
1
checkbox helper question
I used scaffolding, then modified. As an after thought I added a "boolean" checkbox to my database, form with this tag <p> <%= check_box ''is_hot_item'', @photo.is_hot_item %> <label for="is_hot_item">hot item?</label><br> </p> I check it and save. But I don''t get 1 saved in my database field. :( I have just the
2006 Jul 19
6
Howto: Check_box with a variable (no model)
Hi, I would like to put a checkbox on a form where the input field is a variable rather than a field in a model. The normal way (with a model) would be: <%= check_box(''client'', ''accept'', {}, "1", "0") %> But since accept is a variable @accept and model client will not be there, how do I make a check box work? Regards, Paul
2006 May 05
0
is this good for a conditional checkbox?
i''m pretty new to RoR and the MVC style of programming in general. i have one page with a list of applications that several users can access. in my view, i have a conditional that decides whether the checkbox is checked or unchecked. being new to this, i just did it the only way i could think of and want to see if there''s a better way of accomplishing it. <%
2005 Dec 25
2
[repost] newbie questions
Hi all, I''m following the shop example in ''Agile Web Development with Rails''. I would like to extend the checkout screen, in such a way people can change the number of items they have selected in there cart. In my controller I have: def checkout @cart = find_cart @items = @cart.items if @items.empty?