>From: "Austin Govella" <austin.govella@gmail.com>
>Reply-To: rails@lists.rubyonrails.org
>To: rails@lists.rubyonrails.org
>Subject: Re: [Rails] (no subject)
>Date: Mon, 14 Aug 2006 14:22:01 -0500
>
>On 8/14/06, Jim Weir <javawaba@hotmail.com> wrote:
>>...I am trying to put a "Browse" button to allow a user to
select a file
>>for
>>upload. How can I modify the code so that it automaticall generates a
>>"file_field" instead of a "text_field"?
>
>Googling "rails file upload field":
>* http://www.google.com/search?q=rails+file+upload+field
>
>came up with this:
>* http://www.myersds.com/notebook/2006/07/25/basic_file_uploads_with_rails
>
>(There''s a form helper tag that generates a file upload field.)
>
>
>
>--
>Austin Govella
>Thinking & Making: IA, UX, and IxD
>http://thinkingandmaking.com
>austin.govella@gmail.com
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
I have the file upload field, now the problem is the datetime field I had to
add...
this .rhml,
<%= start_form_tag :action => ''create'' %>
<%= render :partial => ''form'' %>
<%= submit_tag "Create" %>
<%= end_form_tag %>
<%= link_to ''Back'', :action => ''list''
%>
....creates a html page with a datetime field name,
<select name="product[date_available(1i)]">
this,
<%= select_datetime(datetime = Time.now, options = {:prefix =>
''product''})
%></p>
....generates a datetime field name,
<select name="product[year]">
How can I modify the select_datetime function so that it returns the same
datetim name as the automatically rendered one above?
Jim
_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/