Displaying 20 results from an estimated 900 matches similar to: "facebook_form_builder.rb - add_default_name_and_id"
2008 Jan 25
1
form error with datetime select
Hi, Im trying to build a form using:
<% facebook_form_for(:task, at task,:url => create_task_path) do |f| %>
Assign Task To: <%= fb_friend_selector %>
<%=f.text_field :ttype, :label=> "Title"%>
<%=f.datetime_select :duedate, :label=> "Due Date"%>
<%=f.buttons "Add" %>
<% end %>
But im getting an
2006 Aug 18
0
Why is select helpers not using options in add_default_name_and_id ?
Hello,
In actionpack/lib/action_view/helpers/form_options_helper.rb (trunk) @
~296 in the
def to_select_tag(choices, options, html_options)
function, why is there
add_default_name_and_id(html_options)
instead of
add_default_name_and_id(options)
This is inconsistent with the non-select helpers where
add_default_name_and_id always use options. Is there a special reason
for this?
2006 Feb 05
0
How can i specify default time to datetime_select tag
I want to specify a different default time to datetime_select tag how
can i do that.
also i was looking at rails helper code
-----------------------------------------------------------------------
module ActionView
module Helpers
module DateHelper
def to_datetime_select_tag(options = {})
defaults = { :discard_type => true }
options = defaults.merge(options)
2007 Dec 08
3
Uploading photos using facebook & attachment_fu
Hi All,
I''m trying to use a form to upload a photo that I will save using
attachment_fu. I''m very new to Facebookr so I apologize if this is covered
somewhere, but I''m kind of stumped.
Here''s what I''m doing now:
<% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id =>
params[:id] }, :html => {
2006 Sep 15
1
In datetime_select, :order does not work, but it works for date_select Why
Hi All
In my project I am to take date of birth from user so I used
datetime_select. It renders three selection boxes, year, month and day. But
I want order as day, month and year. I added :order option for
datetime_select, it renders normal selection boxes with order year, month
and day. Why :order does not work with datetime_select? see my following
code
<%= datetime_select(:user2,
2008 Jun 09
3
Rails 2.1 and ddatetime_select
I''ve updated to 2.1 and am continuing to have issues with
datetime_select helpers which worked fine previously.
Example:
<% form_remote_tag(:url => { :controller => ''notes'',
:action
=> :add_booking_note_ajax,
:id => @booking},
2006 Feb 22
1
specifying m/d/y order in datetime_select
the date_select form helper has a neat little feature which lets you specify
the order of the month/day/year that is displayed on the form via the :order
parameter. i.e.
<%= date_select ''blah'', ''somedate'', :order=>[ :month, :day, :year ] %>
however, i don''t see a similar option for datetime_select. passing
an :order parameter is happily
2006 Nov 04
0
observe_field and datetime_select
Hello all,
I have a form with a datetime_select.
I need to use the actual time selected in an action triggered by
observe_field.
Could make it work with other select fields, but not with datetime_select.
Seems that observe_field can locate the element just by the id (not by the
name).
If so, how can I set the ID of datetime_select ???
I''m in this for some hours, but could not find a
2006 Mar 01
0
datetime_select & styles
Hello,
apologies if this has a trivial solution but after rumaging around
google for a while I haven''t found one. I am trying to set the style of
the datetime_select compound widget but it appears to ignore all my
efforts ... the API specifies
datetime_select(object, method, options = {})
so you would expect
<%= datetime_select ''log'',
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 20
4
Small Date Formatting Question regarding datetime_select()
Is there a way to make datetime_select() dropdowns work on a 12hr
clock? I need to make a input field that works exactly like the
reminders datetime selecton dropdowns in Backpack to populate a
datetime field in my DB. i.e in the format: month, day, year ? hour
(1-12) minute am/pm. Should I change my database to have a separate
column for date and one for time and use date_select()?
Can
2006 Aug 07
1
datetime_select problems
Hi,
I have a datetime select in my form like this:
DATE/TIME REPORTED: <%= datetime_select ''report'', ''rep_date'' %>
This works beautifully for creating a new record. The data is saved as:
2006-08-07 11:33:00
Now, the problem is when I try to load the form with saved values
to do an update.
The above code works and loads the saved data in another one
2011 Jun 06
0
datetime_select and in_time_zone?
I''m working with an app for a concert tour website (www.yogabbagabbalive.com),
where all times (announcement times, on-sale start times, and event start
times) are local to each particular venue''s time zone. I take the user
entered date/time where applicable and run a before_filter to set the
appropriate time zone so that everything is stored in the database in UTC.
For the
2006 Mar 21
5
Getting a time select input
I''m having trouble workign out which ActionView DateHelpers to display a
time input for an ActiveRecord field of type :time.
I just want an hours input and a minuites input. I can get these with
time_select helper using :field_name and :prefix but it gives both hours
and miniutes the same name.
<%= select_time(Time.now, :prefix => "search", :field_name =>
2006 Jul 07
0
datetime/date problems w/ Oracle
I am "script\generate scaffold"ing w/ Oracle. The CRUD controls for DATE
columns in _form.rhtml are generated as datetime_select, rather than
date_select . This is understandable, as Oracle uses a DATETIME data type
for DATE columns. I''m also not too bothered by the fact that I have to
manually replace "datetime_select" w/ "date_select" for all
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys,
1. Which is the difference between this two methods? (select_datetime,
datetime_select)
2. How I assign the selected date-time values, to an specific variable
or array using select_datetime
I know do it using datetime_select(''object'',''method'')
I aprecciate your attention.
Thanks
PD: Sorry about my english.
2006 Apr 01
6
how to use datepicker
This is the webpage:
http://projects.exactlyoneturtle.com/date_picker/
I have downloaded and installed it. But how do I use in view page?
This is the usual view with ordinary datetime_select:
<p><label for="product_date_available">Date available</label><br/>
<%= datetime_select ''product'', ''date_available'' %></p>
2007 Jan 24
1
Removing empty class attribute from @template.content_tag
Hey all,
I have a quick question regarding the @template.content_tag methos when
creating a custom form builder.
Currently have the following method in my AccessibleBuilder class:
def datetime_select(field, options = {})
required = options.delete :required
label = options.delete :label
@template.content_tag("div",
@template.content_tag( "span", Example Label ) +
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All,
I''ve been playing with Rails - did the recipe/category sample from
onLamp.com - fairly straight forward - even got it working against
postgres.
Anyway, I''ve been appling rails to a small test project and I can''t
seem to get the syntax down or find a sample of how to use the date
control on a custom new/edit view. The CRUD (is that right?) that
automatically
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