Approved a form using a link or a button send it by email with the form info attached
Hi im trying to do this as a special requirement of my boss, basically he wants to approved a form, when the form is submmited by someone else, but he dont want to use the back end of umbraco to make this, because will be more easy and less time consumer just to recieved the form and click a button or a link in the body message of the form to approved, that put me to think about what will be the best thing to do.
i have two ideas:
1. Create a fieldtype element or a workflow element that will pass a link with the info submmited by the form and trigger the "Approved".
or
2. (im already working in this one) i make a copy of the PreviewFormDialog.aspx page that comes with contour and I'm passing the recorid of the form on the page (?recordGuid=), in this way im getting the info of the form reflected in that page, but:
- i dont know how to insert that record using braket system of contour into a link to send it by mail using "send email" when the form is submitted to the person that is going to make a review and approved the form.
- i've been trying to post the form in a url, but im kinda confuse and any situation seems to be a fix.
Well you can simply use the Contour api to change a record state. So you will need some code that does that. And in the mail you can then simply point to a page on your site where you perform the action (of course make sure to pass the record id)
but i dont know if i have to use a user control and even where can i use the c# code without have to complie a class, any direction to help me to complete this will be great, thanks a lot for all your help.
tim i make this with a web control user, but i have a error when i compile in visual with the word record in the line 23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Forms.Core;
using Umbraco.Forms.Core.Services;
using umbraco.BusinessLogic;
namespace ApprovedButtonAC
{
public partial class WebUserControl1 : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
RecordService s = new RecordService(record);
if (s != null)
s.Approve();
s.Dispose();
}
}
}
Approved a form using a link or a button send it by email with the form info attached
Hi im trying to do this as a special requirement of my boss, basically he wants to approved a form, when the form is submmited by someone else, but he dont want to use the back end of umbraco to make this, because will be more easy and less time consumer just to recieved the form and click a button or a link in the body message of the form to approved, that put me to think about what will be the best thing to do.
i have two ideas:
1. Create a fieldtype element or a workflow element that will pass a link with the info submmited by the form and trigger the "Approved".
or
2. (im already working in this one) i make a copy of the PreviewFormDialog.aspx page that comes with contour and I'm passing the recorid of the form on the page (?recordGuid=), in this way im getting the info of the form reflected in that page, but:
- i dont know how to insert that record using braket system of contour into a link to send it by mail using "send email" when the form is submitted to the person that is going to make a review and approved the form.
- i've been trying to post the form in a url, but im kinda confuse and any situation seems to be a fix.
im trying to follow the example in this page:
http://our.umbraco.org/forum/umbraco-pro/contour/18030-Anybody-got-a-Review-Form-field-type
but still kinda confusing, any help or ideas to get directions to the solve or best aproach of the solution will mean a lot to me, thanks!
Comment author was deleted
Well you can simply use the Contour api to change a record state. So you will need some code that does that. And in the mail you can then simply point to a page on your site where you perform the action (of course make sure to pass the record id)
Hi Tim well i have everything almost done, i setup a page with a form in a editable macro, and im passing the recird id in a link using ?recordGuid=
but im stock about how to insert the buttn approved in the page.
you were talking about do this in this pors?
http://our.umbraco.org/forum/umbraco-pro/contour/18030-Anybody-got-a-Review-Form-field-type
but i dont know if i have to use a user control and even where can i use the c# code without have to complie a class, any direction to help me to complete this will be great, thanks a lot for all your help.
tim i make this with a web control user, but i have a error when i compile in visual with the word record in the line 23
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Umbraco.Forms.Core; using Umbraco.Forms.Core.Services; using umbraco.BusinessLogic; namespace ApprovedButtonAC { public partial class WebUserControl1 : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { RecordService s = new RecordService(record); if (s != null) s.Approve(); s.Dispose(); } } }
what do you think, do i have something wrong?
is working on a reply...