Support

Home Forums Event Espresso Premium Get mobile number in input field on checkout page

Get mobile number in input field on checkout page

Posted: February 20, 2018 at 3:58 am

Viewing 3 reply threads


swisswebprofi

February 20, 2018 at 3:58 am

Hello,

How can I get the mobile number in the input field on checkout page automatically like First name or Last name?

Of course, I want this when the user is registered and logged in to my website.

This is an example of my current checkout page when a user is logged in and wants to make an order:

https://gyazo.com/f31627d973a381b14669ce0c9029b031

But I want to allow him not to have re-entered his phone number, it means the condition that should be on the checkout page when ordering is this:

https://gyazo.com/8e4de7dedc7660a48f397fc479c5a5c2

This is the page where the user edits his information.

Best Regards


Tony

  • Support Staff

February 21, 2018 at 3:48 am

Hi there,

Are you using the WP user integration add-on?

If you are then you can use a snippet to pull the answer from a previously answered question using this snippet:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/mn_wp_user_addon_save_custom_answers_too.php

Meaning on the first registration the user providers their phone number, then any registrations after that EE will pull the previously used answer.


swisswebprofi

February 22, 2018 at 7:34 am

Hello,

Yes, I use the WP user integration addon, also I put this code snippet into my functions file, and I still not get the phone number into an input field.

Any other suggestion?

Best regards


Tony

  • Support Staff

February 22, 2018 at 12:38 pm

Hmm actually, I realise that phone question is likely the System Question EE creates, its not a custom question you have created yourself is it? (In which case the above snippet will not work)

If it’s the system question, you should be able to use this snippet instead:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-wp-user/jf_filter_address_answer_for_wpuser.php

That pulls the system address (and phone) questions and auto-fills them with the answer on the EE Contact for the user.

Viewing 3 reply threads

The support post ‘Get mobile number in input field on checkout page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso