Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > 2 part newsletter subscription form View modes: 
User avatar
Member
Member
KwikWeb - 10/18/2010 7:06:59 PM
   
2 part newsletter subscription form
Hi guys

Is it possible to have a 2 part newsletter subscription form? What I mean is on the first page, the user just has to enter their email and then click 'sign up'. This takes them to the next page where they enter their First and Last name, and a few other optional fields.

If so, how is this best implemented?

Thanks!

User avatar
Kentico Support
Kentico Support
kentico_radekm - 11/8/2010 3:50:34 AM
   
RE:2 part newsletter subscription form
Hello.

You will need to do some customization to accomplish this task.

At first, you need to clone existing Newsletter subscription web part since you will modify its code. You can clone web part in Site Manager -> Development -> Web parts -> select web part, clicking Clone web part button.

First task is make redirection to second page (containing cloned web part) after user subscribes to some newsletter. You can do it in code-behind of /CMSWebParts/Newsletters/NewsletterSubscriptionWebPart.ascx.cs web part, in „Submit button handler.“ You can use UrlHelper.Redirect(string url) method for this purpose.

On second page, cloned Newsletter subscription web part is placed. If you need to add new fields, you can add them as standard .NET controls (asp:TextBox). In code-behind, you need to ensure that new values are saved into proper columns (sb.SetValue() method).

Best Regards,
Radek Macalik