Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » UserDefinedForms - Add more fields choice

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 984 Views
  • Kisskool
    Avatar
    Community Member
    11 Posts

    UserDefinedForms - Add more fields choice Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    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.

  • Kisskool
    Avatar
    Community Member
    11 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    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.

  • cuSSter
    Avatar
    Community Member
    56 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    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.

  • Kisskool
    Avatar
    Community Member
    11 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    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...

  • cuSSter
    Avatar
    Community Member
    56 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    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!

  • Kisskool
    Avatar
    Community Member
    11 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    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.

  • cuSSter
    Avatar
    Community Member
    56 Posts

    Re: UserDefinedForms - Add more fields choice Link to this post

    Wow, good news indeed! Really humbled here, but it was you who's doing the coding. Just keep us updated of your progress.

    984 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.