Copied to clipboard

Flag this post as spam?

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


  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 04, 2011 @ 13:50
    Matt Brailsford
    0

    Anybody got a "Review Form" field type?

    Hey Guys,

    I'm working on a form which needs a "Review" stage at the end. I came across this post on a similar subject, which Tim suggested creating a "Review" field type to display on the final step:

    http://our.umbraco.org/forum/umbraco-pro/contour/15754-Preview-of-entered-data-as-a-step-in-a-Contour-form

    I just wondered if anybody had written one they would like to share? I can put one together, it's just I'm on a tight deadline, and would rather not re-invent the wheel if there is already one out there.

    Cheers

    Matt

  • Comment author was deleted

    Mar 04, 2011 @ 13:56

    Hey Matt,

    Another way of doing it would be:

    - Create the form, and set it to manual approve

    - Send the form to a specific umb page (it will post the record id to the page)

    - Use the contour xslt extensions to output the review in the format you want

    - Add a button to the review page that uses the contour api to set the record state to submitted (triggering your workflows)

    Might be faster then a field type

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 04, 2011 @ 17:07
    Matt Brailsford
    0

    Hey Tim,

    Nice idea. I'm giving it a go at the moment, but having a bit of a problem. When I'm on the review page, I need to be able to allow the user to go back and edit the form if they did something wrong. I've setup a dummy form to test the "Allow Editing" feature, but I can't seem to be able to get it to work.

    I've submitted an entry on that form, then gone in the admin, and grabbed the record ID. I've then gone back to the front end, and appended "?recordid={GUID}" to the url of the page with the form on (the form is inserted as a macro, in an RTE area if it makes a difference) but I'm not getting any edit functionality.

    I've also tried "id" and "recordGuid" with no luck.

    Any ideas?

    Cheers

    Matt

  • Comment author was deleted

    Mar 07, 2011 @ 09:18

    It should be ?recordGuid=...  , will check

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 07, 2011 @ 09:21
    Matt Brailsford
    0

    Hey Tim,

    You are right, ?recordGuid= does work (although not sure why it didn't work the first time I tried it, can it be affected by multiple tabs open?)

    Matt

  • Comment author was deleted

    Mar 07, 2011 @ 09:21

    Yeah just tested and it works..

     

     <umbraco:Macro 
    FormGuid="55574c8d-e975-4b01-b604-fe479af51b1a"
    AllowEditing="1"
    Alias="umbracoContour.RenderForm"
    runat
    ="server"></umbraco:Macro>

    And then passing the recordid

    ?recordGuid=6761f36d-b4cd-498b-931b-d2f939548a87

    Just make sure that the record is from the form set on the renderform macro

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 07, 2011 @ 13:29
    Matt Brailsford
    0

    Hey Tim,

    I'm almost there with it, I just don't seem to be able to get it to fire the "On Approve" email. I'm using the following on my confirm button to set the records state to approved:

    CurrentRecord.State = Umbraco.Forms.Core.Enums.FormState.Approved;
    
    using (RecordStorage recordStorage = new RecordStorage())
    {
        recordStorage.UpdateRecord(CurrentRecord, CurrentForm);
        recordStorage.UpdateRecordXml(CurrentRecord, CurrentForm);
    }
    
    Response.Redirect(umbraco.library.NiceUrl(RedirectUrl));

    Is there anything else I need to do to get it to trigger the "On Approved" workflow?

    Cheers

    Matt

  • Comment author was deleted

    Mar 07, 2011 @ 14:02

    try

    RecordService s = new RecordService(record);

    if (s != null)
    s.Approve();

    s.Dispose();

    That should fire the workflows since RecordStorage only handles the db actions

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 07, 2011 @ 14:07
    Matt Brailsford
    0

    Bingo! Worked a treat. 

    Cheers Tim

    Matt

  • Profiterole 232 posts 264 karma points
    Apr 14, 2011 @ 18:23
    Profiterole
    0

    Hi guys, I'm looking to do same thing as Matt, but I struggle with the "CurrentRecord.state..." So, need help to add a button that will set my workflow from "submitted" to "Approved".

    As I understant, I need your piece of code, but can I place that in the template?

    Thank you if you can help me!

  • Andres Cano 22 posts 42 karma points
    Apr 27, 2011 @ 19:46
    Andres Cano
    0

    Hi i was trying to make kinda the same thing, but in the developer document there are some gaps about how to the the from post in a umbraco page, this what im looking form:

     

    1.           Sales Person Fill the Form
    2.           Sales Person Submit the Form
    3.           I get an Email with the submitted Form
    4.          Email Has Form Info and a Link to Visit the Form in a Page and Approve It there
    5.          I Click on the Link
    6.          With the Click, a webpage is opened and I make a Final Review and Click on the Approved Button
    7.         Approved is triggered in Umbraco System
    8.           Sales Person, and Commissions gets an email with the Approved Notice

     

     

     

     

     

     

     

    I think that is closed to the solution in this page, i am just a little bit lost in where to start and how to start to put forms in a web page.

    In the step 3 im using send email and for the approved porpuses i already setup using send email responses to the people that has to recieved the form.

    Any help will be great, thanks a lot!

Please Sign in or register to post replies

Write your reply to:

Draft