Copied to clipboard

Flag this post as spam?

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


  • Roger Hughes 55 posts 88 karma points
    Oct 14, 2009 @ 15:04
    Roger Hughes
    0

    custom validation group on AutoForm

    Hi all,

    Ok, here we go...

    I have a masterpage with an asp:textbox and asp:button for searching my Umbraco site. This obviously appears on each page.
    This all works just fine and for good measure I have it in a validation group.

    Now heres the issue...

    I have used AutoForm for a front end user to post testimonials to the admin area. Now, the form wont fire unless a value in my search box is entered.
    So, I figure I need to give that form a validation group too. So I go into the user control to find the code behind for the autoform. Simple right?

    Wrong!

    There is no code behind because its all in the utilities.dll

    Is there any way of giving the autoform a custom validation group so that I can have more than one asp:button on page?

    Or any other methods to overcome this issue?

    many thanks

    Rog

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 14, 2009 @ 15:31
    Douglas Robar
    0

    I'd recommend you use Doc2Form instead. It was originally based on AutoForm but added a lot of additional features and some documentation as well. Bestof all for your situation, all the code is in the app_code folder so it's right there for you to modify.

    http://umbracoext.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=5251#DownloadId=69002 for the lastest Doc2Form for umbraco 4.

    cheers,
    doug.

  • Roger Hughes 55 posts 88 karma points
    Oct 14, 2009 @ 15:32
    Roger Hughes
    0

    Excellent thanks doug

  • Roger Hughes 55 posts 88 karma points
    Oct 14, 2009 @ 15:35
    Roger Hughes
    0

    Thinking about it doug, is there an easy way of adding captcha to the doc2form?

    Rog

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 14, 2009 @ 15:55
    Douglas Robar
    0

    It would be pretty easy to add the reCaptacha tool to it I think (haven't done it myself but in principle it would be quite straightforward). You copy the reCaptcha dll to the /bin folder and add the recaptcha control to your page.

    You could either hardcode the recaptcha to your form in the doc2form code so it is always present, use an IF statement to insert it in certain situations, or check for a specific docType propery alias name and display the recaptcha field only if it that property is set.

    The reCaptcha site is really helpful.

    Having said that, I'll repeat what others have/do/will say... trying to limit spam is a sure way to decrease the number of humans who fill out the form as well. But if you want to add it, it should be pretty easy.

    cheers,
    doug.

  • Roger Hughes 55 posts 88 karma points
    Oct 14, 2009 @ 16:05
    Roger Hughes
    0

    Thanks Doug, I agree to a certain extent. I think i'll add the function but keep it limited to certain areas.

    Many thanks for your help

    Rog

Please Sign in or register to post replies

Write your reply to:

Draft