Displaying 2 results from an estimated 2 matches for "image_field_number".
2006 Mar 08
19
Creating multiple rows with one form
Hello. I''ve been trying this out for the past two days and I can''t seem to
get it. I''m going to have a page where you can upload x amount of images at
once. Lets say 10 images need to be uploaded, all with a caption.
I''d like to have a browse button to choose the file, then the caption. Now,
if I put 10 of them in one form, fill them all out and submit, I get
2006 Mar 05
2
How to clean up this code?
...''Product was successfully created.''
redirect_to :action => ''list''
else
render :action => ''new''
end
end
---------------------------
----- _form.rhtml partial (just the part of it) -----
<%= javascript_tag "var image_field_number=#{@file_fields_no}" %>
<label>Images</label>
<% if(controller.action_name == ''new'') %>
<% @product.images.each_with_index do |image, i| %>
<input type="file" id="images_<%=i%>_image_url"
name="images[<%=i%>...