Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Nov 16, 2010 @ 15:15
    Matt Taylor
    0

    Can Contour do these: Spelling & more...

    Hello,

    I have been tasked to create an enquiry form and usually I would use a .Net macro however I have come accross Contour and wonder if it will be suitable.

    There are some pretty special requirements for this form.

    1. Captcha
    2. Spell checker
    3. The ability to show a notification to the user if they select a particular option in a dropdown
    4. Either-or mandatory fields (The email or telephone number must be entered but it is not required to enter both)

    I've seen other posts saying the captcha can be done but I would be grateful if someone who knows Contour could tell me which of these others are achievable.

    Thank you.

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Nov 16, 2010 @ 16:53
    Sebastiaan Janssen
    1

    They are all achievable, for sure, what does the spell checker entail?

    There is a custom recaptcha field in the contour contrib project already, feel free to use that one.

    Notifications is a bit more difficult I would guess, but if you can find a good javascript implementation that does what you want, then it would be trivial to build it into your form. The only thing is that I do not know how much of it can be configured trough contour. For example: if you have a different message for each dropdown item that needs to be content editable in Contour, I don't know if you can easily make configuration fields for that. However, have a look at Contour's shared source to see if you can extend the dropdown fieldtype easily.

    Either-or mandatory fields is something I want to have as well, not sure how I would be linking the two fields though. You'd need something like a fieldpicker in your fieldtype (doesn't yet exist).

    So yeah, you'll be facing a bit of a learning curve and I'm not sure how fast you'd run into serious problems. I'd try to do a quick (few hours) proof-of-concept of the most difficult field and see how you like working with the API and if you can achieve what you need.

  • Matt Taylor 873 posts 2086 karma points
    Nov 16, 2010 @ 17:46
    Matt Taylor
    0

    Hello Sebastiaan,

    The spell checker would allow the user to check the spelling of the text thay had entered into the main text area of the enquiry form.
    Not entirely sure how at the moment, probably initiated by clicking a button.

    Does sound like a bit of a learning curve and it may be a little too much for the scope of this project but I'll take a look at the shared source so thanks for that. Just knowing where to find this documentation is useful as I've never found the Umbraco website particularly easy to navigate.

    Thanks,

    Matt

     

     

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Nov 16, 2010 @ 17:55
    Sebastiaan Janssen
    0

    I understand!

    Well, whatever you choose, just remember that creating a custom fieldType in Contour is pretty easy (especially with existing examples out there). Contour ties into the default asp.net validation system, so if whatever you're building does that as well, it would be really easy to integrate that with Contour. 

    If I had some more time on my hands I'd look into how difficult it would be to do extra configuration in a fieldType, if you ever find out something, I'd love to hear about it.

  • Comment author was deleted

    Nov 16, 2010 @ 18:02

    @Sebastiaan, you can add settings to custom fieldtypes (simiar to workflows) and a fieldpicker exist out of the box

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Nov 16, 2010 @ 18:05
    Sebastiaan Janssen
    0

    @Tim Ooh, you're bringing me nothing but good news today! I wish I had more spare time to do some experiments.

    Go for it Matt! ;-)

  • Comment author was deleted

    Nov 16, 2010 @ 18:12

    @Matt, the notificaiton when does that need to happen, when the form has been submitted, or during the selection?

  • Matt Taylor 873 posts 2086 karma points
    Nov 16, 2010 @ 18:17
    Matt Taylor
    0

    Hi Tim,

    Ideally it would happen when the dropdown option was selected because a selection of that option will mean the enquiry cannot be submitted so it wouldn't be nice to make the user fill out the rest of the form and then submit it only to then be told they cannot do so. Hehe.

     

  • Comment author was deleted

    Nov 16, 2010 @ 18:41

    @Matt, for the spel check you could use http://code.google.com/p/jquery-spellchecker/

    Seems there is an asp.net version here: http://forums.asp.net/t/1519923.aspx

     @Matt any more info on the dropdown ? Seems like a strange case...

  • Comment author was deleted

    Nov 16, 2010 @ 19:30

    Almost got a working 'textarea with spelling check' fieldtype, more info soon

  • Matt Taylor 873 posts 2086 karma points
    Nov 16, 2010 @ 20:15
    Matt Taylor
    0

    Wow Tim you're really going some.
    This information is great.

    The drop down is a strange case I admit.
    The form is for a charitable organisation helping youths that live within certain areas.
    The dropdown will contain a list of those areas from which the user must select.
    The final option was to be 'Other Area' and the idea was that if this option was selected, the user you be presented with a pop-up that gave them information about another website that could help them.

    Thinking about it now, if this was too difficult to achieve, a small piece of text near the dropdown and a link to the other site might be just as good.

  • Comment author was deleted

    Nov 16, 2010 @ 21:04

    @Matt, if it's only 1 option that isn't valid you could use some regex ...

  • Comment author was deleted

    Nov 17, 2010 @ 09:39

    Got the spell check fieldtype working, just need to polish it a bit, blog post and download coming soon

  • Matt Taylor 873 posts 2086 karma points
    Nov 17, 2010 @ 10:24
    Matt Taylor
    0

    Amazing.

    I'll certainly be recommending Contour.
    They want to be able to build questionnaires as well which Contour looks perfect for.

  • Comment author was deleted

    Nov 17, 2010 @ 15:10

    Info on spellchecker fieldtype can be found here: http://www.nibble.be/?p=89

  • Matt Taylor 873 posts 2086 karma points
    Nov 17, 2010 @ 15:20
    Matt Taylor
    0

    So cool Tim and so quick too.

    I shall check it out.

    Regards,

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft