WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Phone not being stored (9 posts)

  1. Aleph22
    Member
    Posted 1 year ago #

    Hi there,

    first of all thanks alot for the awesome plugin. I almost have it working exactly like i want it too, but just bumped into a small problem:

    When i subscribe to an event the phone field is not being stored. Initially it was not being shown after the user has logged in so i put after the <?php if( !is_user_logged_in() && apply_filters('em_booking_form_show_register_form',true) ): ?> statement on my booking-fields.php right before the comments form is brought up. (which is being stored)

    My guess is that since i am already registered, and the phone field is not being filled out in the registration page, it is left blank and cant be filled out again? (sorry totally green here to php)

    I am using Version 5.2.3 of Events Manager

    Thanks for all the help.

    A.

    http://wordpress.org/extend/plugins/events-manager/

  2. Aleph22
    Member
    Posted 1 year ago #

    Sorry and just to mention.

    The code to store the phone field i use is this:

    <label for='dbem_phone'><?php _e('Telefoonnummer','dbem') ?></label>
    		<input type="text" name="dbem_phone" id="dbem_phone" class="input" <?php if(!empty($_REQUEST['dbem_phone'])) echo "value='{$_REQUEST['dbem_phone']}'"; ?> />
  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    hi, chances are you need to retreive your phone number using the get_user_meta() WP function -

    <?php get_user_meta(get_current_user_id(), 'dbem_phone', true); ?>

    however, i'm pretty sure the phone number won't be saved if you modify it there, just with the code above. You should be able to modify phone numbers on your user profile page (the normal WP one)

  4. Aleph22
    Member
    Posted 1 year ago #

    Hi Marcus,

    Thanks for the fast response.

    As I understand correctly the bit of code you send me will provide me with the User's phone number. The thing is however that the phone number is not being stored in the form in the first place. (and does not show up in the user profile on the admin page)

    I also dont need to display the phone number anywhere on the frontside of my site but just like my admin to be able to see it on the backside (admin panel)

    Hope this is clear.

    Thanks again for all the support,

    Martijn

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Are you in no-user mode? If so, that'd be why as phones are stored per booking, not to the user account.

    In that case you'd have to do e.g.

    $EM_Booking = new EM_Booking(booking_id);
    $phone = $EM_Booking->get_person()->phone;

    EM should replace the nubmer correction for you.

  6. Aleph22
    Member
    Posted 1 year ago #

    Hi Marcus,

    thanks for the reply. Nope I am not in no-user mode...

    i ll think i ll just add the phone number to the registration form just to solve the problem...

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    ah, rereading this i get your issue now. EM doesn't support user fields for logged in users (pro does). You'd need to add the phone and also update the user meta on e.g. the em_event_save filter

  8. robotcake
    Member
    Posted 1 year ago #

    i see, but how about buddypress? in the pro version can the information hook to the buddypress profile fields instead of user meta? because they will not have access of that and I don't want them to anyway.

  9. agelonwl
    Member
    Posted 1 year ago #

    this is already been requested in the pro forum; no eta yet.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic