Questions about Autoform Options
Shaun
Posted: Monday, December 01, 2008 12:32:41 PM

Rank: Newbie

Joined: 10/9/2008
Posts: 16
Location: Leeds
Hi all.

I'm playing with the UmbracoUtilities package, specifically the Autoform Macro.

It's sitting in usercontrols/umbracoUtilities/AutoForm.ascx.

I've installed the webblog package in order to examine the autoform that's used to add blog comments.

I'm trying to work out exactly how this functions. The code behind file didn't come down with the package, so I only have the ascx file to look at.

I notice that there are no fields configured in the ascx apart from the submit button. If I wanted to amend the form, or create a new Autoform, how should I go about it? by creating my own asp.net control? or is there some way to generate these forms from within the Umbraco admin section?

Any help would be gratefully recieved

Cheers!

Shaun
Dirk
Posted: Monday, December 01, 2008 12:59:29 PM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,123
Location: Belgium
Hi Shaun,

Have a look at Doc2Form, which is a more recent version - but does exactly the same. Code and downloads can be found on Codeplex at http://www.codeplex.com/umbracoext

Has some documentation as well to get you started. Basically, all you need is a document type - in your case, that should be 'blog comment' - add some properties and tell Doc2Form macro to use that document type. Doc2Form will do all the magic for you.

Here's a macro I use to get comments on my blog (I used the Doc2Form - Form option btw):

Code:
<?UMBRACO_MACRO
  macroAlias="Doc2FormInput"
  DocumentType="1048" 
  Template=""
  TabName="data"
  PageTabs="0"
  HideTabNames="1"
  ChooseWhereToStore="[#pageID]"
  EditMode="0"
  ShowTitle="0"
  TitleName=""
  SaveMemberAlias=""
  ShowDescriptions="0"
  RequiredText=""
  SubmitButtonText="Submit comments"
  PreviousButtonText=""
  NextButtonText=""
  TextOnSubmit="Great! Many thanks for your feedback."
  PublishOnSubmit="1"
  RefreshToParent="0"
  RedirectToNode="-1"
  PublishWithUserId="0"
  StorePropertiesInCookies="name,email,website"
  UseAjax="1"
  DefaultValueNode="">
</UMBRACO_MACRO>


Hope this helps.

Regards,
/Dirk




level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Shaun
Posted: Monday, December 01, 2008 2:40:47 PM

Rank: Newbie

Joined: 10/9/2008
Posts: 16
Location: Leeds
Thats brilliant Dirk. Thanks for that!
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.