Copied to clipboard

Flag this post as spam?

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


  • Steve Wilkinson 132 posts 211 karma points
    Mar 27, 2015 @ 13:40
    Steve Wilkinson
    0

    Datepicker field validation

    If I use a datepicker field on a contour form and don't use the datepicker to enter the date and enter it manually it allows me to enter garbage i.e 1315 as the date - this text isn't passed in the email generated by the form using Contour Contrib but Contour doesn't disallow an invalid date to be entered in the field.

    Is this a bug within Contour and what can I do about it?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 27, 2015 @ 14:31
    Jan Skovgaard
    0

    Hi Steve

    Have you disabled the date picker or how should it be understood? If it's just a plain text field I suppose there's not much to do about it...But I'm probably missing something? :)

    /Jan

  • Steve Wilkinson 132 posts 211 karma points
    Mar 27, 2015 @ 15:26
    Steve Wilkinson
    0

    I have not disabled the date picker, it's as it is "out-of-the-box" and if the date picker is used to select the date then the content of the field is correct but it is possible to manually type in the field that the date picker fills in - and as it's a plain text field that the picker fills in, anything can be entered.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 27, 2015 @ 16:56
    Jan Skovgaard
    0

    Hi Steve

    Aaah, yes of course - Get it now.

    Perhaps you can add a pattern attribute to the date picker input type? This requires that you modify the source code Contour generates though but you can learn more about that here https://our.umbraco.org/projects/umbraco-pro/contour/documentation/Developer/Custom-Markup/ and then you can perhaps use one of these patterns http://html5pattern.com/Dates

    Hope this helps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft