Problem getting custom field to post into database

Started by cypherja, January 07, 2010, 06:39:20 AM

Previous topic - Next topic

cypherja

I am having trouble getting a custom field I have added to the registration form to post in my member's database, using version 1.1.11.

I've added a field for the user's name to the registration form (not user name, but actual name) and have it going to the "realName" field of the member's database with no problem, but can't seem to get this other one to work...

I created a field in the member's database called "flotilla" and then added the following code to the Register.template.php file:

<td width="40%">
      <b>Your Flotilla:</b>
           <div class="smalltext">i.e. 1234567</div>
      </td>
      <td>
      <input type="text" name="flotilla" size="20" tabindex="' , $context['tabindex']++, '" maxlength="25" />
      </td>
      </tr><tr>   

This gets the field to show up on the registration screen.

I also added this to Register.php

// Set the options needed for registration.
   $regOptions = array(
              'flotilla' => $_POST['flotilla'],

All of the above gets the field to show up in the registration form, but data is not getting posted to the member's database!  >:(

I'd also like to have this field editable by the member, in their profile.  The same way they can edit instant messenger screen names, location, etc.

Can anyone help me to get the data to post into the database, as well as setting it up so that the member's can change the data via their profile?

Thanks for any help anyone can provide!

- Jason

Arantor

You also need to add it into the code in Subs-Members.php that actually adds the row to the database.
Holder of controversial views, all of which my own.


Advertisement: