Additional Fields In Profile

Discussion in 'Templates customization' started by Guest, May 18, 2003.

  1. Guest

    Guest Guest

    I have added extra fields into the profile.html template which display and update fine.

    One of these fields is a title field with a drop down list choice of Mr/Miss/Mrs/Ms on the signup page.

    It would be very useful to be able to display a select box in the profile page with the value from the database displayed as the initially selected value and the other choices available in the select.

    Is there a way to do this?

    Thanks
  2. alex-adm

    alex-adm Guest

    yes, it is possible.

    assign list of values and their keys to to some value in the "$config" variable, like that:
    Code:
    $config['my_options'] =  array(
    1 => 'first value', 
    2 => 'second value'
    
    then in profile.html template use the following syntax:
    Code:
    <select name=my_option size=1>
    {html_options options=$config.my_options selected=$user.data.my_option}
    </select>
    
  3. Patrice

    Patrice Guest

    Can you tell me how to add a field to the sign-up new member area? I have found the way to add a text box to the profile.php, however, I haven't figured out how to tie it to the database. I've created a record for it, but the text box isn't entering the data to the record.
  4. alex-adm

    alex-adm Guest

    Please check FAQ forum.
  5. zaphod

    zaphod Guest

    Hi Alex,

    Does the method shown in the FAQ work with the latest Pro version? Just comes up with an error here when using the example syntax for a text field. (I'm working with Patrice)

    Doing it slightly differently, when the field "bio" has been added to the DB, and I've added a "bio" field definition array to amember, it semi-works. The data is placed in an array in Data field rather than into the bio field in the DB.

    I'm missing something here, but I think the key in in the mysql db plugin which can't be read. Huge thanks for any advice!
  6. alex-adm

    alex-adm Guest

    Yes, it works. Which code you placed and which error did you get?

    Sure, you can alter database structure, but you are looking for troubles in this case and belive me, there will be troubles. Please don't do it!
  7. Regs

    Regs New Member

    Joined:
    May 5, 2003
    Messages:
    30
    Alex,

    The additional fields instructions don't seem to take into account updating from a members profile page.

    It works when a person orginally registers or if I update the info from the admin panel for a particular user. If the user logs in and then goes to edit their profile info, the fields for entering the info are there but submitting anything in them produces nothing.

    I'm using the RC9 candidate of the latest version I think (at least that's what it says in my admin CP).

    Cheers,

    ~Regs.
  8. alex-adm

    alex-adm Guest

  9. Regs

    Regs New Member

    Joined:
    May 5, 2003
    Messages:
    30
    Worked perfectly, thanks Alex!!!!

    Here's a change that you might want to incorporate into the next version that is directly related...

    In profile.html, change:

    to:

    It worked great for me!

    Cheers,

    ~Regs.
  10. alex-adm

    alex-adm Guest

    thank you!

Share This Page