Using Memberpress Shortcode in Form Field?

Question

I am using Memberpress and I have a form within the members area of my site.

I am trying to create a hidden form field so I know which member submitted the data when it is sent.

I have this so far:

<form action="#">
<input type='text' name='useremail1' id='useremail' value='[mepr-account-info field="user_email"]' hidden='' />
<input type='text' name='useremail2' id='useremail' value='{$user_email}' hidden='' />

<input type="submit" value="Submit" />
</form>

[mepr-account-info field="user_email"]
{$user_email}

and the source of the page outputs like this:

<form action="#">
<input type='text' name='useremail1' id='useremail' value='&#091;mepr-account-info field="user_email"&#093;' hidden='' /></p>
<p><input type='text' name='useremail2' id='useremail' value='{$user_email}' hidden='' /></p>
<p><input type="submit" value="Submit" /></p>
</form>

membersemailworking@site.com
{$user_email}

[mepr-account-info field="user_email"] will work if it is not within the value variable of the form.. how do I get this to work?

0
, Joe Bobby 4 years 2020-06-07T12:10:26-05:00 0 Answers 85 views 0

Leave an answer

Browse
Browse