Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...How do I get my extra form field into userForm.DataBind()?How do I get my extra form field into userForm.DataBind()?
Previous
 
Next
New Post
2/26/2013 9:50 AM
 

Hi Guys!

When I type this in /DesktopModules/Admin/Security/Register.ascx:

<dnn:DnnFormEditor id="userForm" runat="Server" FormMode="Short" />

I get this (which is good):

 

Enter a First Name
Enter a Last Name
Provide a Display Name
Enter a valid Email address

 

But when I type this:

<dnn:DnnFormEditor id="userForm" runat="Server" FormMode="Short">
    <Items>
        <dnn:DnnFormTextBoxItem ID="organization" runat="server" DataField="Organization" Required="true" />
    </Items>
</dnn:DnnFormEditor>

I get this (unlabeled field):

Enter a First Name
Enter a Last Name
Provide a Display Name
Enter a valid Email address

 

How do I get my extra field's label to show in the form? The OnLoad function in Register.ascx.cs has this in it (but I can't figure out where User comes from):

            userForm.DataSource = User;
            if (!Page.IsPostBack)
            {
                userForm.DataBind();
            }

Adding this to /App_GlobalResources/SharedResources.resx has no effect:

 <data name="Organisation.Text" xml:space="preserve">
     <value>Organisation:</value>
    </data>

 

Thanx

Dave

 
New Post
5/23/2016 3:15 AM
 
I don't know if this would fix the issue but there is a typo with Organization in your code:


Organisation:


I've been dealing with a similar issue. I'm trying to access the value passed through an added custom field on the registration form.

My knowledge of dnn is fairly limited so feel free to correct me here. As far as I can tell the form is passing the data through the object User as specified with userForm.DataSource = User. On the CreateUser() function in Register.ascx.cs you can reference properties of the passed object by using User.UserID for the UserID and UserInfo.Email for the email. However, I don't know what code I would use to reference an added custom field like 'Organization'. Part of my confusion stems from the fact that I am unable to find the underlying mechanics for how the inputted form elements populate the User object. For example, how email ends up at UserInfo.email.
 
New Post
5/23/2016 3:22 AM
 
I don't know if this would fix the issue but there are two typos with "Organization" in your resx file.

I have been having a similar issue. I am fairly new to dnn so feel free to correct me here. My goal is to reference an added custom field in the createUser() method in Register.ascx.cs. I can reference properties like UserID using User.UserID and email with UserInfo.email, but I don't know how I would reference an added custom property like "Organization". As far as I can tell, the register form is passing the data through the object User as specified here: userForm.DataSource = User. Part of my confusion stems from the fact that I am unable to find the underlying code for how the form values end up populating the object User. For example, how the form value "email" ends up at UserInfo.email.
 
New Post
5/23/2016 3:30 AM
 
test response
 
New Post
7/8/2016 6:47 AM
 
i've been having the same issue :(
and dont find any solution yet
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...How do I get my extra form field into userForm.DataBind()?How do I get my extra form field into userForm.DataBind()?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out