One of our clients have a huge form i want to convert to Contour. Right now it's not even in Umbraco, but i of course want to change that :-)
The problem is that the form uses a web based service that allows the user to enter his / her phone number in a small form, click the forms submit button and then the users addres information will be found and filled in to some form fields. It's based on a linked javascript that does the actual look up of the address info.
Is there anyway to put this into a Contour form ?
If not, then i have the option to not fill in the address fields, but get an XML file with the info, is there any way i can put the addres info into fields in the Contour form programatically ?
if the current solution uses javascript on the client to lookup and populate form entry you can ofcourse do this with contour as well. The javascript must be tweaked to update the correct input fields, also it might be easier to use a link (a with jscript action) rather than a button / input with type submit).
If you wish to do this server side after the user has filled in the form you can use a workflow and lookup the values from the xml.
I just havent found a way to put any Java script in the Contour based form ??
The form must be filled out before submit, because the service does not always find the info, so the user must be able to manually fill in the addres info.
Yes, you're right. FIeldnames change based on label in countour, and if you look at the page source you will find this in the class attribute of the div surrounding each field. I think this will be the easiest thing to use when you decide on which fields to populate, using jQuery it should be quite easy.
Special field type
One of our clients have a huge form i want to convert to Contour. Right now it's not even in Umbraco, but i of course want to change that :-)
The problem is that the form uses a web based service that allows the user to enter his / her phone number in a small form, click the forms submit button and then the users addres information will be found and filled in to some form fields. It's based on a linked javascript that does the actual look up of the address info.
Is there anyway to put this into a Contour form ?
If not, then i have the option to not fill in the address fields, but get an XML file with the info, is there any way i can put the addres info into fields in the Contour form programatically ?
Thanks
Mikael
Hi Mikael,
if the current solution uses javascript on the client to lookup and populate form entry you can ofcourse do this with contour as well. The javascript must be tweaked to update the correct input fields, also it might be easier to use a link (a with jscript action) rather than a button / input with type submit).
If you wish to do this server side after the user has filled in the form you can use a workflow and lookup the values from the xml.
Hope this helps,
Harald.
Thanks, that sounds good.
I just havent found a way to put any Java script in the Contour based form ??
The form must be filled out before submit, because the service does not always find the info, so the user must be able to manually fill in the addres info.
Comment author was deleted
Hi Mikael,
You'll just need to place the js on the template where you'll add the contour form.
But what about the field names that the contour macro inserts ?
They can change - right ?
I think the JS expect the fields to have certain specific names, but i'll give it a try.
Thanks
Yes, you're right. FIeldnames change based on label in countour, and if you look at the page source you will find this in the class attribute of the div surrounding each field. I think this will be the easiest thing to use when you decide on which fields to populate, using jQuery it should be quite easy.
Harald :-)
is working on a reply...