• Resolved TrekRight

    (@trekright)


    Thanks for the recently-added ability to read / format email addresses via dynamic data. However, the feature isn’t working quite right.

    REPRODUCE:
    1. In ACF, add an Email-type field named ‘email_address’. Save.
    2. Create a new post. In the ACF properties of the post, assign an email address to the new field. For example, assign ‘[email protected]’.
    3. Add a Meta getter to the post, setting it to use the ACF field. Assign ‘Mailto link’ to the ‘Add Data Conversion’ property.
    4. Save the post and open it on the front end. Test the link.

    RESULT:
    The ‘mailto’ code is added correctly. However, the email address ends up having an ‘http://‘ before it:
    http://[email protected]

    The full link ends up being
    mailto:http://[email protected]

    NOTE:
    I’ve also tried doing the same thing using just a plain ACF text field and it has the same issue.

    • This topic was modified 3 years, 6 months ago by TrekRight.
    • This topic was modified 3 years, 6 months ago by TrekRight.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author wpsoul

    (@wpsoul)

    Hi. Because this option is working for text. I guess, ACF email field assign also link to field. So, you need to convert field to regular text field to prevent this

    Thread Starter TrekRight

    (@trekright)

    I tried it with a text field already (see my original post above). I just tried it again as well. Using a regular text field with an email address entered into it, the resulting link still has the ‘http://’ added after the ‘mailto:’ and before the entered text value (i.e. the email address).

    Plugin Author wpsoul

    (@wpsoul)

    I found potential place with problem. Will be fixed in update

    Thread Starter TrekRight

    (@trekright)

    Great! Thanks.

    Plugin Author wpsoul

    (@wpsoul)

    Did you try now?

    Thread Starter TrekRight

    (@trekright)

    Hi. Sorry – I’ve been away for the past couple of days. Yes, it works now. Thanks for the fix.

    A small feature request, though: could you add to your ‘to-do’ list to implement support for the ’email’ ACF field type? That has the advantage of having validation to ensure the text entry conforms to a valid email address. Thanks!

    Plugin Author wpsoul

    (@wpsoul)

    I think we already added email link post formatting. Did you test it?

    Thread Starter TrekRight

    (@trekright)

    Ah! No, I hadn’t tested it again since you’d said the mailto only worked with text fields. Just tried it now and it seems to work with email-type fields as well. Fantastic! Thank you very much.

    Plugin Author wpsoul

    (@wpsoul)

    Yes, it should work with email field because it’s variation of text field in ACF. Glad to hear that it’s working

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Email Address from Dynamic Data’ is closed to new replies.