Reordering fields in user.php / admin pages

Discussion in 'Templates customization' started by pcinews, Oct 10, 2005.

  1. pcinews

    pcinews New Member

    Joined:
    Oct 10, 2005
    Messages:
    10
    I have added SQL table fields for company and routing address to our amember package and I have manually added the fields to the sign-up, so that I can get them lined up in a logical order making it easy for the users on checkout. Both field work great, great detail of how to do found in the forum and manual .

    I am looking to edit the user.php(edit)function to line up the user_form.html file, in the templates folder, the same way. However, I added the following line to the user_form.html file:

    <input type=text name=street2 value="{$u.street2|escape}" size=32>

    And also added the following line to the add_config_field array in the config.inc.php file

    array(
    'street' => 'Street',
    'city' => 'City',
    'state' => 'State',
    'zip' => 'ZIP',
    'country'=> 'Country',
    'street2' => 'street2'
    )

    The field shows up in the form but not populated with any data from the databse the 'addtional' field also still shows up way down the list as do all the other additional fields. I need these fields to show up directly under the first line of address information for quicker data entry from the back end.

    How can I reorder this information to reflect these changes? i assume its something simular to customizing the sign-up procedure can you point me in a direction to editing which files which functions / arrays and I can prob take it from there?

    Thanks
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    You need to do the following:
    - rollback all your modifications;
    - add a field named "street2" using aMember Cp -> Add Fields. Choose to NOT display this field on signup and profile editing pages;
    - edit templates/signup.html template and add field "street2" below existing "street" field.
    - edit templates/admin/user_form.html and do the same
  3. pcinews

    pcinews New Member

    Joined:
    Oct 10, 2005
    Messages:
    10
    Where Is This Varible Found?

    That worked - Out of Curiosity where is the following variable in the user_form.php file being called from?

    {$additional_fields_html}
  4. pcinews

    pcinews New Member

    Joined:
    Oct 10, 2005
    Messages:
    10
    Found the variable, how can I turn off

    member.inc.php

    and my problem related to the first post all i was missing was {$u.DATA.field_name} instead of {$u.field_name} everything works now!
  5. kcarey

    kcarey Member

    Joined:
    Dec 27, 2009
    Messages:
    42
    Alex, etal,

    I know this is an old thread, but I'm still using Version 3.1.8... waiting for some additional stability/features before moving to v4.

    I added street2 as recommended above. signup.php/html and profile.php/html are working appropriately (with the help of http://www.amember.com/forum/threads/adding-fields.4105/page-2). However, on user.php (editing members from admin panel)... street2 now displays twice - 1 time where is should according to my edit of user_form.html and the second where the "$additional_fields_html" field is located. I would like to remove street2 from the "$additional_fields_html" field... how do I do this without affecting other code?

    Thanks for your help!

    kcarey
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Unfortunately this is impossible without affecting other code.You can remove $additional_fields_html block from user_form and readd all fields manually.

Share This Page