How to Loop through mulitple field data no model

I am creating a form for users to add part information.
I want to include 5 text fields to gather part numbers.

The user then submits the forms.

Question: Is there a ruby way to loop through the form fields info and
extract it on each loop?

Thank you for your time in advance.

Mitch

Mitchell G. wrote:

I am creating a form for users to add part information.
I want to include 5 text fields to gather part numbers.

The user then submits the forms.

Question: Is there a ruby way to loop through the form fields info and
extract it on each loop?

Thank you for your time in advance.

Mitch

To Clarify,

The 5 text fields are for part numbers. The user can enter up to 5 part
numbers. Then click submit.

On 11 Jul 2008, at 21:38, Mitchell G. wrote:

If the inputs are all names parts[] then params[:parts] will be an
array containing the 5 entries.

Fred

Frederick C. wrote:

On 11 Jul 2008, at 21:38, Mitchell G. wrote:

If the inputs are all names parts[] then params[:parts] will be an
array containing the 5 entries.

Fred

That makes sense. I will give it a try.

Thanks Fred

On Jul 14, 6:44 pm, Mitchell G. [email protected]
wrote:

Thanks Fred

I tried to user the following for the inputs
<%=text_field_tag item[] %>

But I get teh following error

well yes, there is no local variable called item. You need to pass
text_field_tag the name you want ie ‘item[]’

Fred

Mitchell G. wrote:

Frederick C. wrote:

On 11 Jul 2008, at 21:38, Mitchell G. wrote:

If the inputs are all names parts[] then params[:parts] will be an
array containing the 5 entries.

Fred

That makes sense. I will give it a try.

Thanks Fred

I tried to user the following for the inputs
<%=text_field_tag item[] %>

But I get teh following error

undefined local variable or method `item’ for
#<#Class:0x35167bc:0x3516780>

Frederick C. wrote:

On Jul 14, 6:44�pm, Mitchell G. [email protected]
wrote:

Thanks Fred

I tried to user the following for the inputs
� � � � � �<%=text_field_tag �item[] %>

But I get teh following error

well yes, there is no local variable called item. You need to pass
text_field_tag the name you want ie ‘item[]’

Fred

Thanks Fred, sorry about the dumb question. I have that working now.

Thanks again,

Mitch