• Resolved Aleph22

    (@aleph22)


    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/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Aleph22

    (@aleph22)

    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']}'"; ?> />
    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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)

    Thread Starter Aleph22

    (@aleph22)

    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

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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.

    Thread Starter Aleph22

    (@aleph22)

    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…

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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

    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.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Events Manager] Phone not being stored’ is closed to new replies.