Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mikael Mørup 297 posts 326 karma points
    Feb 11, 2010 @ 14:25
    Mikael Mørup
    0

    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

     

  • Harald Ulriksen 207 posts 249 karma points
    Feb 11, 2010 @ 15:54
    Harald Ulriksen
    0

    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.

  • Mikael Mørup 297 posts 326 karma points
    Feb 11, 2010 @ 16:22
    Mikael Mørup
    0

    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

    Feb 11, 2010 @ 16:25

    Hi Mikael,

    You'll just need to place the js on the template where you'll add the contour form.

  • Mikael Mørup 297 posts 326 karma points
    Feb 12, 2010 @ 08:56
    Mikael Mørup
    0

    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

     

  • Harald Ulriksen 207 posts 249 karma points
    Feb 12, 2010 @ 11:19
    Harald Ulriksen
    0

    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 :-)

Please Sign in or register to post replies

Write your reply to:

Draft