Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    You should be able to simply use that variable without passing it.

    Thread Starter MarcelMundinar

    (@marcelmundinar)

    $_POST can not be passed, that is my problem… any ideas?

    Plugin Author Michael Simpson

    (@msimpson)

    Don’t pass it. Just use it. It’s a super-global variable available in all scopes.

    Thread Starter MarcelMundinar

    (@marcelmundinar)

    …ok, I think the problem is WordPress itself, when handing $_POST from any of my script to a page (index.php?page_id=xx) the $_POST is not passed down to the shortcut (or this plugin), even if I just echo $_POST[‘myvar’] it is empty. Any ideas?

    Marcel, we use this and it works well:
    echo '<input class="required email" id="mce-EMAIL" type="email" name="EMAIL" onblur="if (this.value == \'\') {this.value = \'Your Best Email\';}" onfocus="if (this.value == \'Your Best Email\') {this.value = \'\';}" placeholder="Your Best Email" value="'.$_POST["EMAIL"].'" />';

    Please try and confirm?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to pass $_POST to shortcode PHP code?’ is closed to new replies.