Forums

Adding or removing additional text input field

d3vilr3d 09 May, 2008
Hi Guys,

Has anyone ever done this with chronoform? To have user add or remove additional input field? Will the result be sent via email and saved into database?

Thanks,
William
GreyHead 09 May, 2008
Hi William,

I'm not sure I understand what you want to do - can you give an example?

Bob
d3vilr3d 09 May, 2008
Yes,

I am trying to make an order form. The visitor will input their details regularly.

As for the items they want to order, there is an input field. Right next to the field will have a text link that saids "add another item".

when clicking on that, an additional text field appears for the visitor to insert their 2nd order item.
d3vilr3d 09 May, 2008
i've made the form. and heres the debug result

_POST: Array ( [FirstName] => First Name [LastName] => Last Name [CompanyName] => Company Name [Address] => Address [City] => City [State] => State [Zip] => Zip Code [Phone] => Phone Number [Fax] => Fax Number [Email] => E-Mail [Comments] => Comments [item] => 1 [items1] => 2 [items2] => 3 [items3] => 4 )

however, the email result only records item 1, which is the default input box.

additional inputs are not recorded.
GreyHead 09 May, 2008
Hi 3£vilr3d,

Hard to tell what's happening without the form code. How are you creating the extra fields? For ChronoForms to work with them they have to be named in the form html.

Maybe adding extra fields to an array would work? name="item[]"

Bob
This topic is locked and no more replies can be posted.