Quseiton about the registration form

Posted by Community Admin on 05-Aug-2018 06:42

Quseiton about the registration form

All Replies

Posted by Community Admin on 25-Nov-2013 00:00

HI,

I have two questions about sitefinity.

1.I want to add a new field in the registration form. How can I achieve that?
2.How can I change the flow of the template?For example , I have two registration forms , which are in two different pages and must be finished by the register, before the success of the registration. 

Cheers,
Wing

Posted by Community Admin on 27-Nov-2013 00:00

Hello Wing,

Here's a sample of how to add a textfield to your template, so that it is properly wired to the custom field inside your profile type:

<sitefinity:TextField runat="server" ID="testCustom"  DisplayMode="Write" DataItemType="Telerik.Sitefinity.Security.Model.SitefinityProfile" DataFieldName="testCustom"/>

The name of my field here is "testCustom" and it is added in the basic profile. If you add the field to another profile type, you will have to change the DataItemType to the relevant Profile Type.  The DataFieldName property indicates to which field the value should be bound. Also, an ID is necessary to be added.

There is also a forum thread regarding this:
http://www.sitefinity.com/developer-network/forums/designing-styling/how-to-display-custom-fields-in-registration-form

You can use the option: "Open specifically prepared page" to redirect the user to another page, but keep in mind that after submitting the form the user will be created.

Regards,
Vassil Vassilev
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Nov-2013 00:00

Thanks too much Vassil .
I can do it now but I have another question.
How to set the validation of CAPTCHA in the registration form?
but I cannot  do the validation I wanted. I want to validate the CAPTCHA before finished the registration.

code was posted in below link
www.sitefinity.com/.../how-to-set-the-validation-of-captcha-in-the-registration-form-

Cheers
wing



Posted by Community Admin on 02-Dec-2013 00:00

Hi,

I have responded in details how to add Captcha to a registration widget or using the form builder in your other thread:

http://www.sitefinity.com/developer-network/forums/bugs-issues-/how-to-set-the-validation-of-captcha-in-the-registration-form-

Regards,
Vassil Vassilev
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 02-Dec-2013 00:00

Hi,

I have responded in details how to add Captcha to a registration widget or using the form builder in your other thread:

http://www.sitefinity.com/developer-network/forums/bugs-issues-/how-to-set-the-validation-of-captcha-in-the-registration-form-

Regards,
Vassil Vassilev
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 10-Feb-2017 00:00

How do you validate your own custom fields when using the captcha example you have given?  As the field isn't accessible from the Captcha class (as it's in the layout template).  I've tried to find my control on the page:

 

            this.RadCaptchaControl.Validate();
            var managedProperty = (Telerik.Sitefinity.Web.UI.Fields.TextField)this.FindControl("ManagedProperty");
            var checkManagedProperty = managedProperty.IsValid();
            return base.ValidateInput() && this.RadCaptchaControl.IsValid;

Posted by Community Admin on 10-Feb-2017 00:00

This works

 

this.RadCaptchaControl.Validate();
            var managedProperty = base.Container.GetControl<Telerik.Sitefinity.Web.UI.Fields.TextField>("ManagedProperty",true);
            var checkManagedProperty = managedProperty.IsValid();
            return base.ValidateInput() && this.RadCaptchaControl.IsValid && checkManagedProperty;

This thread is closed