1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need to add a contact detail

Discussion in 'Styling and Customization Questions' started by strongarm_playa, Aug 30, 2012.

  1. strongarm_playa

    strongarm_playa Active Member

    So I want to add a phone number section in the personal contact details section on profile pages. How do I go about doing this?
    I want to be able to click on the number and send a text or call whenever I am mobile.
  2. Chris D

    Chris D XenForo Developer Staff Member

    Ok, good question :)

    You'd need to create a new custom field:

    Admin CP > Users > Custom User Fields > Create New

    Set this up accordingly.

    Most mobile devices will automatically parse phone numbers.

    It can be forced by setting the value HTML output to:

    <a href="tel:{$value}">{$value}</a>

    But that will then display phone numbers as URLs even on non-mobile browsers and may not work on some phone number formats.
    strongarm_playa likes this.
  3. strongarm_playa

    strongarm_playa Active Member

    Thanks! It works when mobile. No problem.. now how do I make it selectable when in tapatalk?
  4. Chris D

    Chris D XenForo Developer Staff Member

    You probably can't.

    Tel links are usually only parsed in HTML - that'd be in Safari and Mail etc. I don't think they even work in third party browsers.

    A solution would be to use the HTML output I posted above, but again I'm not certain Tapatalk would output it and it would render the HTML in desktop browsers too.
  5. strongarm_playa

    strongarm_playa Active Member

    thx Chris! I did use your code above. It works perfect in my mobile browser. But tapatalk wont let me select anything. Either way this helps. Thx again!
  6. Chris D

    Chris D XenForo Developer Staff Member

    Ok, great, glad it helps.

    Tapatalk must simply not allow that, but glad this is working well for you :)

Share This Page