Adding Fields

Discussion in 'Customization & add-ons' started by jschemmel, Sep 26, 2006.

  1. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    nicheblogmedia ,
    What you have in aMember CP -> Setup -> Advanced -> User can change the following fields
  2. webrusch

    webrusch New Member

    Joined:
    Mar 20, 2008
    Messages:
    4
    Display an additional field on the PDF receipt

    btw

    Display a custom field on the PDF receipt - simply add this
    Code:
    {$u.data.additionalfieldname}
    to amember / templates / mail_receipt_contact.pdf.txt

    cheers
  3. tault

    tault New Member

    Joined:
    Sep 5, 2005
    Messages:
    4
    Im trying to do something like that too. I made another post but maybe its best for me to just post here. Basically i have dozens of products but they are all under one subscription. However for tracking purposes i want to find out which item users are joining for.

    So an example would be this:

    1) Someone goes to the signup page
    2) There is a drop down box that says what product did you join for?
    3) They select that item from the dropdown box.
    4) They fill out the rest of the information and are on their way.
    5) Keep in mind i already have an active site with a large number of users so i just want to make sure i wont have any database problems of "user field not found"
  4. jbround39

    jbround39 aMember Pro Customer

    Joined:
    Mar 20, 2008
    Messages:
    61
    This is just something that I've come across a bunch of times in customizing my amember site and I thought it might be helpful to someone else since all of the above examples make the same generalization that the user manual makes. All custom fields are NOT stored in the same place in the member record.

    Whenever you are accessing your custom fields from the user or member record, it is important to note that your choice of common field or sql field in the admin cpanel matters. If you set up the custom field as a common field, it is stored in the data field, if you set it up as an sql field, it is not.

    All examples in the user manual assume that custom fields are set up as a common field. Thus, custom fields are accessed as $u.data.yourfield or $user.data.yourfield

    However, if the field was set up as an sql field, it is accessed as $u.yourfield

    I've come across that many times in the user manual where it is assumed that all custom fields are stored in the data field. But if you set it up as an sql field, it isn't. I've never seen that discussed here much, so I thought I'd post it in a sticky thread related to custom fields.

    Related to this, if you are writing a plugin, make sure your plugin can take into account both types of customized fields. I've recently encountered two plugins that did not work on my site until either I or the author of the plugin changed the code to also look for custom sql fields.
  5. wardeh

    wardeh New Member

    Joined:
    Jan 10, 2010
    Messages:
    23
    Checkbox - required checked

    I am trying to add a custom field that is a checkbox and it must be checked in order for the registration to complete.

    All the configurations I've tried allow registrations even if box is unchecked.

    I'm attaching a screenshot -- can you look at it and tell me how I can make this field required, FOR REAL? :)

    Thank you!
  6. wardeh

    wardeh New Member

    Joined:
    Jan 10, 2010
    Messages:
    23
    BTW, I know I can elect to use the included terms of service template, but I've chosen not to go that route.
  7. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This seems to be a bug, please contact us in helpdesk we will fix it.
  8. wardeh

    wardeh New Member

    Joined:
    Jan 10, 2010
    Messages:
    23
    Okay -- thank you.
  9. sitewizard

    sitewizard New Member

    Joined:
    Nov 29, 2010
    Messages:
    14
    did you ever get custom select statements working?

    A few people have asked for this over the years - but there doesn't seem to be any code snippets to suggest how to do it.
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    If you want to include field for date, aMember already have plugin for smarty that allow to do this:
    Code:
    {html_select_date prefix="begin_date" time=$p.begin_date  start_year="-10" end_year="2037"}
    
    But of course you will need to include this manually in template.
    Also in php you will need to use this function to get valid date from three fields :
    PHP:
    $begin_date set_date_from_smarty("begin_date",$vars);
  11. lee_pro

    lee_pro New Member

    Joined:
    Mar 26, 2013
    Messages:
    26
    I'm using aMember Pro v.4 to management users of website use CMS Wordpress.

    - On aMember allow add field to form sign up when guest register a account.
    - aMember allow sync user with wordpress when user add new account on aMember.
    - When I add new a field to form sign up. aMember process to save to database.
    - To amember could save this new data field on wordpress. I need to configure anything?

    Ex: I add fiel 'birthday' on form sign up. when user register, this fiels save to database of aMember.
    I need config anything to field 'birthday' save to database wordpress with account new create.

    Please help me!

    Thanks you!

Share This Page