Displaying 20 results from an estimated 10000 matches similar to: "AJAX and select form help"
2006 Dec 27
0
HABTM Checkboxes - Adding/Updating Users to a Project
Hello all,
I''m trying to create a HABTM checkbox action that adds/updates ''users''
to a ''project''.
I have the following laid out.
---------------------
TABLES
---------------------
create_table "assignments", :id => false, :force => true do |t|
t.column "project_id", :integer, :default => 0, :null => false
2009 Jul 02
2
ajax based form - render action breaks form
hi all,
i''ve 4 select boxes in a form(_form.rhtml), one dependent on the
other. initially, when form is loaded, only 1st box is enabled. after
selecting value in 1st select box, it inserts 2nd, on 2nd''s change, 3rd
gets inserted and on 3rd''s change, 4th gets inserted. this flow works
perfect for me. i''ve used ajax for this flow. this form then is sent to
2006 Feb 28
5
Problem with paginate, include and foreign keys
Hi all,
Solaris 10
Ruby 1.8.4
Rails 1.0.0
Postgres 8.1
postgres driver 0.7.1
I''m having a problem with getting paginate() to properly pick up an FK
constraint properly.
I don''t seem to have this issue with ActiveRecord, however. Consider:
create table start_dates (
id bigserial,
start_date date unique,
max_slots int default 40,
primary key (id)
);
create
2005 Oct 14
0
Adding extra field in form using ajax causes extra field to be overwritten, any way around that.
I''m having trouble when I try to add another field in the form using ajax.
I''m trying to add another line_item object into the invoice and i''m using
the link_to_remote function to implement this. When I do that though and
submit to the form, the line_item entries all have the same field name so
they get overwritten. I''m not sure how to get around that.
Here is
2006 Jan 08
2
RoR AJAX select box update?
Hi,
I want to update a select box depending on another selected option thru
ajax.
Heres how I do it
# _form.rhtml
<select id="budget_coordinator_id" name="budget[coordinator_id]"
onchange="<%= remote_function(:update => "budget_project_number", :url
=> { :action => :get_projects }) %>">
<%=
2006 Jan 18
5
NOOB Ajax question: handling form input
Hi,
I was trying to modify how a standard edit form works so I could use Ajax to
truncate a zip code field which became too long as the user is entering the
value. The form was generated by the generate scaffold script. The form is
filled with default data taken from the current record. I coded the
following changes to a field in the _form.rhtml file:
<%= text_field
2009 Jun 19
0
[PATCH server] add toggable sections to vm form
the vm form is getting cluttered, this patch simply add
collapsable sections to the form, making the 'resources'
and 'network' sections collapsed by default
- icon added
- methods added to the js
- reorganization / cleanup in rhtml, indentation changes,
no functionality or content changes
---
src/app/views/vm/_form.rhtml | 109
2013 Mar 25
1
validates presence of foreign key fails in nested form
I''m using accepts_nested_attributes as follows:
class Timesheet < ActiveRecord::Base
attr_accessible :status, :user_id, :start_date, :end_date,
:activities_attributes
has_many :activities, dependent: :destroy
has_many :time_entries, through: :activities
accepts_nested_attributes_for :activities, allow_destroy: true
end
class Activity < ActiveRecord::Base
attr_accessible
2006 Aug 29
1
Scope problem with form_remote_tag, ajax?
Hi all,
I have tracked an odd behavior down to what I think is an issue of
scope. In short, when I use form_remote_tag to establish an AJAX form,
my database fields don''t get populated when performing an edit on the
record. Those same fields will get populated using start_form_tag and
no AJAX. I think that Ruby can''t find the local object that represents
the database
2010 Sep 03
1
[PATCH] Adding some control over usages in the network creation/edition form
Signed-off-by: Simon COURTOIS <scourtois at linagora.com>
---
src/app/controllers/usages_controller.rb | 13 +++++++
src/app/models/usage.rb | 2 +-
src/app/services/usage_service.rb | 23 ++++++++++++
src/app/views/network/_form.rhtml | 56 +++++++++++++++++++++++++++++-
src/config/routes.rb | 1 +
2006 Feb 28
1
Working with date_select ...
I am a little confused about the best way to work with date_select. I see that
in my views it generates a simple input form that allows for the entry of year,
month and date information. If I just leave it at that, great!
But what if now in the controller, I want to work with the date information. I
actually want to take the user input date and compute a new date some number of
days in the
2007 Jul 08
2
datetime_select, is creating an instance of the Time class
Hello
It seems that datetime_select, is creating an instance of the Time
class. Why would that be?
I found this while building a site where people can create vigils
(prayer vigils, peace vigils, etc). When I added a validation method
that compared start_date to created_at, it generated the error:
ArgumentError (comparison of Time with DateTime failed):
I was able to put a breakpoint in the
2009 Jun 19
1
[PATCH server] add collapsable sections to vm form
the vm form is getting cluttered, this patch simply add
collapsable sections to the form, making the 'storage'
and 'network' sections collapsed by default
---
src/app/helpers/application_helper.rb | 9 +++++
src/app/views/vm/_form.rhtml | 55 +++++++++++++++++++++++++--------
src/public/javascripts/ovirt.js | 25 +++++++++++++++
2006 Jun 25
0
Ajax not working on ie and konkeror
My ajax code does not work on ie and konkeror. It does work on firefox.
The code is
<%= link_to_remote( "Add Another",
:update => "event_times",
:url => { :action => :add_time , :indice =>
@indice, :date_start_day=>@datetime.start_date},
:position => :bottom,
:complete
2006 Apr 15
2
Multi-parameter assignment
Hi,
I''m trying to submit data from text boxes on a form to one variable in
my controller, in the same way that datetime_select has date(1i),
date(2i), etc for day, month, year, etc...
I''ve named my variables event[start_date(1i)] event[start_date(2i)] and
event[start_date(3i)] but this doesn''t seem to work and
event[:start_date] is blank ... any pointers would be
2007 Apr 09
1
help with ActiveRecord joins
I''m working on a fairly complex join query and could use a bit of advice
from more expert users of ActiveRecord.
I have an events table with quite a lot of data, with has_many relations
to categories, age_groups, and event_images. In my first naive
implementation, each event had a date, so to load all upcoming events
efficiently, I''d do:
Event.find(:all,
2007 Sep 11
2
How to search with range when I am using AAF
acts_as_ferret :fields => {
:name => {:},
:desc => {},
:start_date => {}
}
def start_date
self.start_datetime.strftime("%Y%m%d")
end
Now that I am strong start_date in YYYYMMDD format, I want to search for
all event in between 20070506 and 20070809
What will my query look like when I am using aaf. This one doesn''t work
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 Jun 21
3
Simple range question
I have a model with a datetime field called start_date. I''d like to do
a find on the model so that it returns only records with the start_date
equal to the current day.
Something like this:
@foos = Foo.find(:all,
:conditions => //?? start_date equal to today''s date
??// ] )
Thanks in advance for any help.
-------------- next part
2009 Jul 24
2
[PATCH server] add collapsable sections to vm form
the vm form is getting cluttered, this patch simply add
collapsable sections to the form, making the 'storage'
and 'network' sections collapsed by default
credit goes to jayg for contributing alot to
this patch in terms of simplification and cleanup
---
src/app/helpers/application_helper.rb | 4 +-
src/app/views/vm/_form.rhtml | 35 ++++++++++++++++++++++----------