problems with javascript and field names in web to form
Hi.
I'm creating a couple fo forms in CRM using the web to form for leads & contacts.
I'm trying to set up a booking form that will fill all the relevant details as a contact in the crm and its all pretty easy so far except that i'm trying to add a script to the form to allow users to copy the billing address into the event address (if the two are the same) just by checking a box.
I have a script that works but it only works if the field names do not have spaces. For example it will work with the field name "First_Name" but it won't work with the field name "First Name" (no underscore).
I think the problem is obvious but i'll explain anyhow.
The 'First Name' field is a default field of the CRM. I could create custom fields with "name" & "surname" but that would mean that i would lose the ability to have the "First Name" & "Last Name" fields merge as one name when i approve the lead or the contact. What i mean is that currently if the form submits with the fields as they are the visitor can enter their first & last name in 2 separate fields but they come through showing both names in one field. I have already set up invoice templates & a few others which use the "name" field and would rather not have to change them but will if i have to.
I'm not sure if i need a way to use the existing field names with an underscore or if i should create custom field names and then somehow make them operate the same way by merging the "name" & "surname" from the form fields into the"name" field of the Lead or Contact Detaisl page.
does that make sense?
No big deal if not i just thought i'd ask.
I'm just suprised that the field names are actually broken and not underscored.
Cheers,
Danny.