I have 2 workflows setup on my form after form is submitted. The email one works fine. I have created a post form to url. The url is a page in same site and i have put the it in the url field eg
/thought-reader/resources/download-thank-you/
i am also mapping over a field. After the form is submitted i would have thought that the form page would be posted to this url? At the moment i just get thank you message set in the form definition. Am I missing something? Can this actually be done?
Workflow execution happens in the background, if you do want a redirect you'll need to customize the workflow type, sourcecode for all default types is available
OK I have another idea. Basically what I am trying todo is after form is submitted show a download link. So I have hidden field on form which has id of the download. I have created razor view for the form. In the code after submit we have
There should be a record id available and then take a look at the dynamic objects available that will wrap a record and allow you to easily access the data (Umbraco.Forms.Mvc.DynamicObjects namespace)
Once you have a dynamic record you should be able to do myDynamicRecord.fieldcaption (without spaces)
Post form to url workflow
I have 2 workflows setup on my form after form is submitted. The email one works fine. I have created a post form to url. The url is a page in same site and i have put the it in the url field eg
/thought-reader/resources/download-thank-you/
i am also mapping over a field. After the form is submitted i would have thought that the form page would be posted to this url? At the moment i just get thank you message set in the form definition. Am I missing something? Can this actually be done?
Regards
Ismail
Comment author was deleted
Workflow execution happens in the background, if you do want a redirect you'll need to customize the workflow type, sourcecode for all default types is available
http://our.umbraco.org/FileDownload?id=5060
Tim,
OK I have another idea. Basically what I am trying todo is after form is submitted show a download link. So I have hidden field on form which has id of the download. I have created razor view for the form. In the code after submit we have
@if (Model.SubmitHandled)
{
<p class="contourMessageOnSubmit">@Model.MessageOnSubmit</p>
//can i get the newly submitted value somehow here? if i can get current page ? as the download link and form are on same page?
@Request["download"]
}
If I can get the id after form submitted then i can get and display the download link. How do i get the field value from the newly submitted form?
Regards
Ismail
Ok got it working im just using uquery probably better way of doing it
@if (Model.SubmitHandled)
{
<p class="contourMessageOnSubmit">@Model.MessageOnSubmit</p>
var downloadId = uQuery.GetCurrentNode().GetProperty<string>("download");
var media = new Media(int.Parse(downloadId));
<a href="@media.getProperty("umbracoFile").Value">Download</a>
}
Comment author was deleted
There should be a record id available and then take a look at the dynamic objects available that will wrap a record and allow you to easily access the data (Umbraco.Forms.Mvc.DynamicObjects namespace)
Once you have a dynamic record you should be able to do myDynamicRecord.fieldcaption (without spaces)
Comment author was deleted
Ah you want to fetch it from the current page :) yeah that is an option then
Tim,
Works a treat woot! Have to say very very impressed with latest contour think i last used it v1 ish
Comment author was deleted
Glad to hear that, if you have ideas for further improvements I'm all ears :)
is working on a reply...