More in this section

Forums / Developing with Sitefinity / Form Development

Form Development

4 posts, 0 answered
  1. Jose Malone
    Jose Malone avatar
    2 posts
    Registered:
    15 Sep 2009
    15 Sep 2009
    Link to this post
    Hi,

    I'm looking at different CMSes. Before I download and install I have one very basic need.

    My specific need is creating different pages and web forms which based on what page a person lands on such as such as a result of a PPC campaign or an affiliate the page would trigger the right content.

    I'm curious to know how this might be achieve with Sitefinity.

    Also, it seems Sitefinity supports virtual directories? I'm surprised how many CMSes do not.

    Sincerely,

    Jose
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Sep 2009
    Link to this post
    Hello Jose Malone,

    Generally your could try the following. You have a landing page. On this page you should add Login Control. Each user should  authenticate himself/herself using this form. Login control has a property called DestinatioPageUrl. right after the user is authenticated you will check it by user name ( or appropriate parameter or ProfileProperty) and send it to his/her page.

    Sample code:

    protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            {    
                this.Login1.MembershipProvider = UserManager.Default.MembershipProvider.Name; 
            } 
            this.Login1.LoggedIn += new EventHandler(Login1_LoggedIn); 
            this.Login1.Authenticate += new AuthenticateEventHandler(Login1_Authenticate); 
        } 
     
        void Login1_Authenticate(object sender, AuthenticateEventArgs e) 
        { 
            e.Authenticated = UserManager.Default.ValidateUser(this.Login1.UserName, this.Login1.Password); 
        } 
     
        void Login1_LoggedIn(object sender, EventArgs e) 
        { 
            HttpCookie cookie = this.Response.Cookies[FormsAuthentication.FormsCookieName]; 
            UserManager.Default.SetAuthenticationCookie(cookie); 
            string loggedInUser = ((TextBox)Login1.FindControl("UserName")).Text; 
            switch(loggedInUser) 
            { 
                case "admin"
                    Response.Redirect("http://www.telerik.com"); 
                    break
                case "test"
                    Response.Redirect("ttp://www.sitefinity.com"); 
                    break
                         
            } 
             
        } 

    I hope this helps.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Jose Malone
    Jose Malone avatar
    2 posts
    Registered:
    15 Sep 2009
    15 Sep 2009
    Link to this post
    Ivan,

    Thank you. My apologies. I realize in my haste I wasn't very clear.

    The web visitors would be consumers looking for product information. The form would be such as an inquiry form or contact form. Their information would be then sent to the appropriate deparment and logged in a database. They would not be members of the site so login in isn't a need. That could be an option down the road.

    The flow would look like

    1) Consumer searches Google
    2) Based on keywords our Adwords might appear
    3) Consumer clicks our Ad
    4) Arrives at landing page. Inqury form might be on same page, or another click away.
    5) Consumer fills out form goes to another up-sell product, or a thank you page.
    6) Cosumer information is sent into our CRM system for followup.

    I guess what I'm trying to figure out is do we need to create the forms in Visual Studio and make a modulefor sitefinity? Or does sitefinity have the abilitiy to create the forms internally that we can use as a template?

    Thank you for your help.

    Sincerely,

    Jose
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Sep 2009
    Link to this post
    Hello Jose Malone,

    I guess what I'm trying to figure out is do we need to create the forms in Visual Studio and make a modulefor sitefinity? Or does sitefinity have the abilitiy to create the forms internally that we can use as a template?

    You need to create your custom form and then add it to Sitefinity. You can create a new module if you are going to manage some data from the backend. Generally the front end  controls( user and custom ) are used to display the data only. You can use OpenAcessORM to persists the data ( or another appropriate way for your system).

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered