Copied to clipboard

Flag this post as spam?

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


  • Stephen 204 posts 246 karma points
    Sep 04, 2011 @ 10:53
    Stephen
    0

    Store info with my form control

    I've developed a specific form for a cllient and imported into Umbraco as a control and all is working well however if i was doing this in a .Net site i would be doing 2 things.

    1. Capture data in the email and send to client.(i'm doing this for the umbraco control)
    2. Capture data to database and allow the cllient view the form enquiry details via the cms.(not doing this)
    as this is only my 2nd umbraco website I'm not sure how this should be done...can i just continue as normal and capture the data to umbraco database i'm using? I've seen some extra tabs on the umbraco install for other starter kit forms, is this done in the same way?
    Regards,
    Stephen

  • Rich Green 2246 posts 4008 karma points
    Sep 04, 2011 @ 11:00
    Rich Green
    0

    Hey Stephen,

    You have a few options.

    1) Add then as nodes in Umbraco using the API (easy to do), means your client can view/edit them in the admin system.

    For this usually use a structure like this

    -Content

    ----Home

    ------About Us Etc 

    ----Settings

    ------Form Responses

    -------- Response 1

    -------- Response 2

    -------- Response 3

    2) Alternatively you can add them to a SQL Server table (either using the Umbraco datalayer or any you prefer) and then add a custom section for viewing the responses 

    http://umbraco.com/help-and-support/video-tutorials/developing-with-umbraco/custom-sections,trees-and-pages/adding-a-new-section.aspx

    Rich
  • Stephen 204 posts 246 karma points
    Sep 04, 2011 @ 14:07
    Stephen
    0

    Hey Rich, option 1 sounds cool and the API is something I've yet to tap into...do you know of any good example on the site?

    Thanks for the reply.

    Stephen

  • Rich Green 2246 posts 4008 karma points
    Sep 04, 2011 @ 14:12
    Rich Green
    0

    Hey Stephen,

    The API is pretty simple once you get your Visual Studio solution set up and reference the correct dll's, here's the wiki http://our.umbraco.org/wiki/reference/api-cheatsheet

    Have you considered Contour, sounds like exactly what you need if you want to save some time, this saves results back to Umbraco and also allows your users to edit the form.

    Rich

  • Stephen 204 posts 246 karma points
    Sep 06, 2011 @ 10:47
    Stephen
    0

    Yeah contour sounds like it ticks all the boxes but I have already quoted the client and the price did not include contour however they have moved the goalposts slightly with the number of forms they now want.  I do enjoy developing my own .net forms and think it would be a worthwhile exercise delving into the API to help with my learning curve though...

    Cheers,

    Stephen

  • Stephen 204 posts 246 karma points
    Sep 06, 2011 @ 10:59
    Stephen
    0

    So thinking this through with option 1, the simplified process could be as follows

    1. create a document type that contains all my form elements.
    2. using the api create a new document, in the settings folder, based on the form doc type.
    3. populate the newly created content with stuff from form.

    Cheers,

    Stephen

  • Rich Green 2246 posts 4008 karma points
    Sep 06, 2011 @ 11:06
    Rich Green
    0

    Hey Stephen,

    Looks good, this is how we've done it on various projects, we use the doc types to create a 'form builder' which the client can create forms from themsealves, they can then drop them into any page they like.

    Regards

    Rich

  • Stephen 204 posts 246 karma points
    Sep 06, 2011 @ 11:21
    Stephen
    0

    I dont think mine needs to be as complicated, the form is not going to change and the client does not need access to it, just need to store the response's somewhere and let the client see it. Been reading up on the API cheat sheet are there any example projects or code out there?

    Cheers,

    Stephen

  • Rich Green 2246 posts 4008 karma points
    Sep 06, 2011 @ 11:25
    Rich Green
    0

    Hey,

    Not sure how up to date this is but sample application from Umbraco TV here http://video.umbraco.org/developer/events/samples.zip

    API / Events videos here http://umbraco.com/help-and-support/video-tutorials/developing-with-umbraco/events.aspx

    Rich

Please Sign in or register to post replies

Write your reply to:

Draft