Copied to clipboard

Flag this post as spam?

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


  • J 447 posts 864 karma points
    Mar 28, 2014 @ 14:15
    J
    0

    Zip code field type

    Are there any zip code field type that i could use? If not how could i create one?

    Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 28, 2014 @ 17:41
    Jan Skovgaard
    0

    Hi J

    Perhaps you can find some inspiration in the Contour documentation on how to do this.

    But basically I suppose you'll need to make use of the maxlength attribute on a regular input="text" field and then add an id, class or data-* attribute and then use serverside/clientside validation using a regular expression to make sure the format is correct.

    Hope this helps a bit.

    /Jan

  • Donald St. Martin 83 posts 128 karma points
    Mar 28, 2014 @ 17:58
    Donald St. Martin
    1

    If you expand the "Additional Settings" on the form field, there is a box where you can insert a regex. This will prevent the user from submitting a value that doesn't meet the regex. It won't stop them after "x" amount of characters but it will stop them from submitting it with the wrong set of characters. You can also include a tooltip with an example of what you are expecting the user to input.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 28, 2014 @ 21:11
    Jan Skovgaard
    0

    Aaaah yes of course! I really should have thought of that. Sooo simple to implement :) #h5yr Donald!

    /Jan

  • J 447 posts 864 karma points
    Mar 31, 2014 @ 11:43
    J
    0

    Jan - i should have explained myself in a little more depth. You have sites which allow you to enter your zip code then you would click a button which displays multiple addresses. This then allows the user to select the address applicable and fills in existing textboxes with relevant info.

    This is the functionality im after but in Contour? If it needs to be created from scratch i would like to have some guidance on where to start with this and how to integrate?

  • J 447 posts 864 karma points
    May 07, 2014 @ 15:09
    J
    0

    Anyone?

Please Sign in or register to post replies

Write your reply to:

Draft