Then you should be able to get the data using this, and remember you need to add the partial view or partial view macro file on the page with the form.
Hope this helps, and don't hesitate to ask more questions.
Hello Dennis
We could make the following example please:
a form to send a number A and number B, in the results page get this data, them to the operations A + B and A * B
Display these results on the results page.
It is the first project in Umbraco and I'm a little lost in the forms only part.
In order to get debug info for macros you can do a few things:
Use visual studio and set breakpoints
Enable tracing in your web.config and visit /trace.axd to get info
like you used to get when using webforms (in MVC it's not possible to
add this info inline with the page any more
Go into your ~./config/umbracoSettings.config and change the line
to
this will give you errors right where the macro is in the page
Of course you can also add logging yourself so you can see what's going on in your code. Another low key solution is that you break down your code it small bit, then you can see which line that throws the error.
Get the request data from umbracoforms
Hi
I am newbie in Umbraco. I need process the data from form in a new page.
I have a form created with umbracoforms in Umbraco 7.2.8 with redirect to other page in the submit.
How I can recover the data sent from the form in the final page?
Thanks
Hi Carlos and welcome to our :-),
You can get the data from a form by Razor. Try to see this documentation
https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Working-With-Data/
There is also an example code
Hope this helps,
/Dennis
Hi Dennis
Thanks for your help
I am using "var data = Umbraco.Forms.Mvc.DynamicObjects.Library.Dynamic. GetRecordsFromPage(CurrentPage.Id)" and "@data", but I don't have anything.
If I put @using Umbraco.Forms.Mvc.DynamicObjects.Library I have error in compilation.
Could you tell me what is wrong?
Thank you
Hi Carlos,
If you are using a partial view or a partial view macro files, then you first need to add. @using Umbraco.Forms.Mvc.DynamicObjects
Under @inherits UmbracoTemplatePage or @inherits Umbraco.Web.Macros.PartialViewMacroPage depending on which type of partial file that you are using.
Then you should be able to get the data using this, and remember you need to add the partial view or partial view macro file on the page with the form.
Hope this helps, and don't hesitate to ask more questions.
/Dennis
Hello Dennis We could make the following example please: a form to send a number A and number B, in the results page get this data, them to the operations A + B and A * B Display these results on the results page.
It is the first project in Umbraco and I'm a little lost in the forms only part.
Thank you
Hello Denis
I create a Partial View Macro File, but I can't connect this script calculo.cshtml with the form. Could you say me how Ican do it?
Thanks
Hi Carlos,
You can do it in the same way as Tim show here http://umbraco.tv/videos/umbraco-v7/implementor/extending/umbraco-forms/adding-forms-to-your-templates/ hit the insert macro button and then choose the macro for the calculo.cshtml.
You can also insert a macro into your rich text editor, try to see this video http://umbraco.tv/videos/umbraco-v7/implementor/extending/umbraco-forms/adding-forms-to-your-content/,
As you can see we have a whole video chapter about Umbraco Forms http://umbraco.tv/videos/umbraco-v7/implementor/extending/umbraco-forms/
Hope this helps,
/Dennis
Hi Dennis
I include the macro with "insert macro button", but I have the error:
Error loading Partial View script (file: ~/Views/MacroPartials/mymacrofile.cshtml)
Could you say me what is wrong?
Thanks
Hi Carlos,
In order to get debug info for macros you can do a few things:
Of course you can also add logging yourself so you can see what's going on in your code. Another low key solution is that you break down your code it small bit, then you can see which line that throws the error.
Hope this helps,
/Dennis
is working on a reply...