10808 Posts in 2494 Topics by 1782 members
Page: 1 2
|Go to End||Next >|
30 May 2012 at 12:06am
Hi SilverStripers !
Firstly, sorry if I make some mistakes, I'm french and not very good in English. Well, I'm making a little website as part of an internship, and I'm having some problems with the UserDefinedForms (or UserForms, it's the same, isn'it ?).
It's my first time with SilverStripe, so I think the biggest problems come from me (I already used Made Simple and Joomla, but not very advanced like SilverStripe).
I'm trying to build a custom register form, but I don't know where I can custom it. All I want to do is to add a password input, a password confirmation and an email confirmation to the UserDefinedForms choices (like text field, checkboxe, email field, dropdown...).
I already created a simple form with Name/Surname/Email Address/Mollom Captcha. How can I add others fields to the UserDefinedForms field choice ? And how can I do an email and password confirmation ? And where can I custom that ?
Thank you in advance.
2 June 2012 at 12:37pm
UserForms is designed for simple forms such as contact and enquiry forms, it doesn't support complex situations like registration. Check out the member profiles module for user registration.
4 June 2012 at 8:09pm Last edited: 5 June 2012 8:15pm
Thank you for your answer Willr. I thought I could use the UserDefinedForms module as a registration form.
Now I use the Memberprofile module, but my question is the same : what I'm miss with the Memberprofile registration form is an email confirmation field with error message (in connection with the email field of course), and a pseudonym field. (do I have to ask this question in another post ?)
I looked for information on this subject recently, but I need some help. If you have just an exemple to add a field (where and which files I need to change), I would appreciate it.
EDIT : I'm watching this tuto : http://www.ssbits.com/tutorials/2010/site-members-registering-users-and-allowing-them-to-edit-their-details/
Is it better to do this manually as in the tutorial, or use the module ? Anyway, it does not answer my question, but it can always help me.
4 June 2012 at 9:00pm
I believe the email confirmation feature that you're looking for is already included in the memberprofile module. Upon registration, an email will be sent to the registrant that contains the account activation link. I think that already serves as an email confirmation.
As of adding new fields to the form, since you're using a module, you can extend it and add additional fields, and use DataObject::use_custom_class() method, if I remember it correctly, so every time the form defined in the module is called, it will use the extended form that you have just created. I am not that sure if this will work, but I guess it's worth looking into.
5 June 2012 at 8:14pm
Hi cuSSter, and thank you for your answer.
Yeah, an email will be sent after registration. But I learned (and read) it is better to add an email confirmation field (like the password confirmation field). Thus, if the future member is mistaken, he knows right away, and he isn't required to wait the confirmation email. I think it's more "friendly".
Regarding the DataObject::use_custom_class() method, I'll see it more closely, and the Dataobjectdecorator at the same time. Thank you for the idea.
Know, my problem is that I don't know where and how the registration form is built. I need to know it, if I want to override the class and add more fields. In the module folder, i can't find any file built the form. I feel that there is just the the profile files...
5 June 2012 at 10:14pm Last edited: 5 June 2012 10:14pm
I see. Yeah, almost all registration forms nowadays have these confirmation field on emails as well. And it's something that you need to add to the existing memberprofiles module. And it's not just mere adding the field, you also need to do the checking of the two fields if they are the same. Just read on extending in SilverStripe, or if you prefer, build your own registration module. Happy coding!
6 June 2012 at 1:48am
Good news !
Thanks to you, I managed to custom the registration form. The only thing left for me to do is the confirmation email field. I will edit this post when I finish what I want.
6 June 2012 at 2:30am
Wow, good news indeed! Really humbled here, but it was you who's doing the coding. Just keep us updated of your progress.
Page: 1 2
|Go to Top||Next >|