Get Umbraco Certified in October

5 courses in 4 different countries across 2 continents leaves no excuse.

Attend courses in the Netherlands, UK, USA and at Umbraco HQ in Denmark.

See the schedule and read more about our training here.

Copied to clipboard

Flag this post as spam?

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

  • Warren Buckley 1902 posts 3691 karma points admin mvp c-trib
    Sep 24, 2009 @ 18:02
    Warren Buckley

    Can /base be used for comment form submission

    Hiya I just wanted to check I can do this with /base before and haven't dreamt it (as I have yet to still use /base yet).

    OK I will try and explain the scenario as best as possible.

    I would like a regular form tag that contains a url to /base to submit a comment (which will add a comment node to that particular blog post) and use the jQuery Validation plugin to do client side validation.

    If JavaScript was disabled would the user still be able to submit the form and do the valdiation in the /base code and reload the blog post page with a new anchor tag to that comment ID so that page is forced a reload and scrolls to that comment.

    eg: my-blog-post.aspx#comment-1026

    With Javascript enabled would it be possible to do the same base code minus the redirect - as I would like to resest the comment form and slide/fade in the comment the user has just submitted.

    If this makes no sense at all, please let me know so I cna try and explain my thoughts better.

    Warren :)

  • Chris Koiak2615 karma points
    Sep 24, 2009 @ 18:39
    Chris Koiak

    This is a great approach and is possible with Base.

    How are you planning on returning appropriate error conditions? I've struggled finding a solution that would support displaying individual field validation message.

    I'd love to see a generic solution that could be used to construct different forms as required.


  • Warren Buckley3691 karma points admin mvp c-trib
    Sep 24, 2009 @ 21:09
    Warren Buckley

    Hiya Chris
    Well its good to hear that base can work with and without JavaScript disabled.

    Well the client side validation will be done with the jQuery validation plugin:

    However to do the validation when Javascript is disabled and that when doing the vlaidation in base i am unsure how to return the error messages then.

    What are your thoughts Chris?


  • Chris Koiak2615 karma points
    Sep 24, 2009 @ 21:52
    Chris Koiak

    ahh... I may have typed too quickly...

    Base may not be suitable for this. I've not used Base in this scenario, but I have done something similar on

    Have a look at the Weather form, and in particular try entering an invalid postcode in the edit section. Notice the (badly styled) error message that appears.

    The weather-edit form is submtted to a 'page' (really an alternative template called AjaxController). The ajaxcontroller page responds with a full page of html, not with a 302 redirect. If JS was disabled the page would still submit to the same ajaxcontroller. The ajax controller returns a full page so would display fine.

    The returned form (including the error message) is 'cut' from the response and replaces the form on the page.One advantage to this approach is that the error messages that are returned can be customised per form field.

    There's bloat on the ajax responses as the majority of the response is ignored, Maybe you could take this approach, but append a flag to the form-action via JS to surpress the full of the response.

    Hopefully that makes sense.


  • Warren Buckley3691 karma points admin mvp c-trib
    Sep 24, 2009 @ 22:10
    Warren Buckley

    Sorry Chris,
    Its probably getting a bit late for me but I didnt understand any of that. Let me re-read that tomorrow in the morning and hopefully it will make more sense.


  • Kenneth Solberg357 karma points core
    Sep 25, 2009 @ 09:05
    Kenneth Solberg

    I made a quick screencast that demonstrates a technique on how to do this with Umbraco Base. I forgot to mention validation, but that should obviously alway be on the serverside. Frontend validation is purely for enhanced usability and eye candy.

  • Ismail Mayat6718 karma points admin mvp c-trib
    Sep 25, 2009 @ 10:25
    Ismail Mayat

    That is awesome, gives me  few ideas, cheers Warren for raising and cheers Kenneth for solution, both have some karma all round :-}



Please Sign in or register to post replies

Write your reply to:

Draft is the community mothership for Umbraco, the open source cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community. This site is running Umbraco version 7.3.0