(no subject)

I have the following code that generates a rhtml page,

<%= start_form_tag :action => ‘create’ %>
<%= render :partial => ‘form’ %>
<%= submit_tag “Create” %>
<%= end_form_tag %>

<%= link_to ‘Back’, :action => ‘list’ %>

…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”?

Jim


Don?t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

On 8/14/06, Jim W. [email protected] 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”:

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 G.
Thinking & Making: IA, UX, and IxD
http://thinkingandmaking.com
[email protected]

“file_field” instead of a “text_field”?


Austin G.
Thinking & Making: IA, UX, and IxD
http://thinkingandmaking.com
[email protected]


Rails mailing list
[email protected]
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,

this,

<%= select_datetime(datetime = Time.now, options = {:prefix =>
‘product’})
%>

…generates a datetime field name,

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/