• Resolved ektrakt

    (@ektrakt)


    Hello,

    can we get the email variable from the form, from a custom field email submitted, for reuse in another extension.

    like “contact form” or wp form ?

    to replace the “email for” [_site_admin_email]

    throug [open-user-map-location value=”email”]

    I would like to put a form on each page created, in the read more section, but which sends an email to the person who created the location, and not the website.

    or juste a simple mailto: link

    <a href=”mailto:<code>[open-user-map-location value=”email”]</code>CONTACT</a>

    But I can not… An idea how to proceed

    Thanks

    Jeff

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author 100plugins

    (@100plugins)

    Hi @ektrakt,

    You can get the email with this shortcode (replace YOUR CUSTOM FIELD LABEL:

    [open-user-map-location value="YOUR CUSTOM FIELD LABEL"]

    or with the PHP function:

    oum_get_location_value( 'YOUR CUSTOM FIELD LABEL', $post_id )

    Use this inside your single location content in the Admin Dashboard (Shortcode) or single page template (PHP function).

    If you want to use this with a form plugin this goes beyond scope of my support. But basically the PHP function should be the way to go.

    Best Regards,
    Daniel

    Thread Starter ektrakt

    (@ektrakt)

    Hello,

    thank you for your answer, for the moment I try to make it as simple as possible with a shortcode in single location content in the Admin Dashboard

    Indeed, when I use [open-user-map-location value=”email”]
    the email is displayed correctly.

    But as I want to hide the email first, and when I combine it with “mailto:” that it doesn’t work anymore.

    example:

    <a href="mailto:[open-user-map-location value="email"]>contact garden</a>

    But the result in the email recipient field is :

    [open-user-map-location value=

    do you have an idea of the problem?

    Thanks

    Jeff

    Plugin Author 100plugins

    (@100plugins)

    Hi @ektrakt,

    This happens because because the shortcode returns the email wrapped in a div box. So the only way would be to use the PHP function inside a real php template of your single page:

    <?php echo oum_get_location_value( 'email', $post_id ); ?>

    Or you just stick to showing the email address (but not linked with a mailto).

    Best Regards,
    Daniel

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

The topic ‘email variable’ is closed to new replies.