• Resolved kirank

    (@kirank)


    Hello Team,

    I am using latest version of ultimate-member plugin i.e 2.0.21.

    i am creating custom field in ultimate-member registration form but unable to print their values in email.

    but it was working on old version of ultimate-member but now i upgrade my php version.

    For email i use field-name, field-id, field data key but it was not working.

    Please find the attachment for registration and email fields.

    Note: Please let us know if it working on pro version

    we will purchase pro version.

    • This topic was modified 6 years, 7 months ago by kirank.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @kirank,

    Can you please clarify what do you mean “creating custom field in ultimate-member registration form but unable to print their values in email.”?
    Can you please attach a screenshot so we can better understand your issue.

    Regards.

    Thread Starter kirank

    (@kirank)

    I have created form with several fields like name, email, city, country and few more.

    i wants to print these values in the email which received by admin, now just getting value for default fields username and email but not city, country etc.

    In mail i got {city} not value of textfield.

    Please let us know is there way to get that fields accessible in email which we sent.

    please check link for screenshot: https://retailrealm-my.sharepoint.com/:i:/g/personal/kiran_rrdisti_com/EW-K9jIoVl5GpLUGr0dbauIBIMEPhWLms18PLqrIXbgpkA?e=q79WjM

    https://retailrealm-my.sharepoint.com/:i:/g/personal/kiran_rrdisti_com/EdU4WeiVGNBOj-Zv3R1Qsf4BXP_d913VF5wimnwFIyYktg?e=omeAjP

    • This reply was modified 6 years, 7 months ago by kirank.
    • This reply was modified 6 years, 7 months ago by kirank.

    Hi Ultimate Member Team,

    I am interested in exactly the same feature!
    Would be more than great to send any UM field in an email.

    For a simple e-mail notification (without the UM fields) I use:
    Notification plugin

    Thread Starter kirank

    (@kirank)

    Hi Ultimate Member Team,

    Please reply on the same.

    Thread Starter kirank

    (@kirank)

    Hi Ultimate Member Team,

    It’s not resolved yet.

    Please reply on the same.

    I have created form with several fields like name, email, city, country and few more.

    i wants to print these values in the email which received by admin, now just getting value for default fields username and email but not city, country etc.

    In mail i got {city} not value of textfield.

    Please let us know is there way to get that fields accessible in email which we sent.

    please check link for screenshot: https://retailrealm-my.sharepoint.com/:i:/g/personal/kiran_rrdisti_com/EW-K9jIoVl5GpLUGr0dbauIBIMEPhWLms18PLqrIXbgpkA?e=q79WjM

    https://retailrealm-my.sharepoint.com/:i:/g/personal/kiran_rrdisti_com/EdU4WeiVGNBOj-Zv3R1Qsf4BXP_d913VF5wimnwFIyYktg?e=omeAjP

    • This reply was modified 6 years, 6 months ago by kirank.

    Hi All,

    Anyone fixed this bug yet? I am having the same issue, it was working fine with the older version.

    created memberID, and used {memberID} to get the value, but it shows {memberID} instead of the actual assigned value.

    Please help~

    Hello Ultimate Member Team,

    I am using latest version of ultimate-member plugin i.e 2.0.37.

    I have created some custom fields to add on ultimate-member account page.
    Its Working fine.

    I want to show the details of all predefined and custom fields in email send upon account update but the problem is i am able to get the value of username, email, first name and last name only.
    I am not able to show the value of custom fields in email like country, state, city etc.

    Any Suggestion is highly appreciated.

    Thanks

    Hello,
    try to use usermeta before your custom field name

    ex: {usermeta:birthdate}

    • This reply was modified 6 years, 1 month ago by talebfadi.

    Why does this only display “Array” in email for radio input?

    So, even though this is marked as resolved, I ran into this problem today as well. It took me a while, but I was able to fix it – with the lines of code.

    I know, this is not how it’s normally to be done – but I was desperate, so I changed the plugins code.

    in plugins/ultimate-member/includes/um-short-functions.php usermeta gets handeled from line 213 to 228. But there they don’t check if the value is an array, so i fixed it:

        // Support for all usermeta keys
        if ( ! empty( $matches[1] ) && is_array( $matches[1] ) ) {
            foreach ( $matches[1] as $match ) {
                $strip_key = str_replace( 'usermeta:', '', $match );
                
                $value = um_user( $strip_key );
                if(is_array($value)) {
                    $value = implode(',', $value);
                }
    
                $content = str_replace( '{' . $match . '}', $value, $content );
            }
        }
    
    
    

    Just copy and paste it and you’ll be fine. But remeber, once you update the plugin, this will be lost.

    • This reply was modified 5 years, 9 months ago by tscheckie.
    • This reply was modified 5 years, 9 months ago by tscheckie.

    Thanks @tscheckie! That’s amazing!

    **Update**

    So now in the new update they moved things a little bit. Not (2.0.49) it is in line 209 and in a diffrent function. Just search
    // Support for all usermeta keys

    in um-short-functions.php in case they move it again.

    • This reply was modified 5 years, 8 months ago by tscheckie.

    @tscheckie – Thank you very much for your perfect solution!
    A tiny tweak: to add space after comma separator in implode() like so
    implode(', ', $value);
    ??

    Hello,

    when I paste this code (in line 209) I’m getting error. Version of plugin is now 2.1.2 – any tips how to solve this?

    And this is the error I get:
    Parse error: syntax error, unexpected end of file in ***/wp-content/plugins/ultimate-member/includes/um-short-functions.php on line 2632

    Thanks in advance
    René

    EDIT
    Found the error, this was my bad. Overwritten too many lines of this code

    return $content;
    }
    • This reply was modified 5 years, 3 months ago by renescr. Reason: Added error message
    • This reply was modified 5 years, 3 months ago by renescr. Reason: Edit
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Custom field value not working in email ultimate-member’ is closed to new replies.