So I’ve got a form on my site that is small (only 2 fields) and on every page. I want the ability to have people enter their information on the form and when they click submit, it will pass the values from those 2 fields over to a larger form designed by using eForm, but I can’t seem to pull that off. Here’s what I’ve done.
Small form:
<form method="post" action="[~19~]">
<div class="sign_up_box_input">
<input class="sign_up_input" onfocus="if(this.value=='Please enter your email here.')this.value='';" onblur="if(this.value=='')this.value='Please enter your email here.';" type="text" name="email" value="Please enter your email here." />
<textarea class="sign_up_input comments" onfocus="if(this.value=='What can we do for you?')this.value='';" onblur="if(this.value=='')this.value='What can we do for you?';" name="message" rows="2" cols="20">What can we do for you?</textarea>
<input class="sign_up_botton" type="image" src="assets/templates/my619/layout/home/submit_button.jpg" name="submit" />
</div><!-- end .sign_up_box_input -->
</form>
The eForm (on document 19) has this code:
<form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm">
<fieldset>
<h3> Contact Form</h3>
<input name="formid" type="hidden" value="ContactForm" />
<label for="cfName">Your name:
<input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /> </label>
<label for="cfEmail">Your Email Address:
<input name="email" id="cfEmail" class="text" value="[!GetSubmittedEmail!]" type="text" eform="Email Address:email:1" /> </label>
<label for="cfMessage">Message:
<textarea name="message" value="[!GetSubmittedMessage!]" id="cfMessage" rows="4" cols="20" eform="Message:textarea:1"></textarea>
</label>
<label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Send This Message" />
</fieldset>
</form>
And the snippets I’m using in the eForm are here:
[!GetSubmittedMessage!]
<?php
return $_POST['message'];
?>
[!GetSubmittedEmail!]
<?php
return $_POST['email'];
?>
When they arrive on the page with the larger form, none of the values passed over from the smaller form show up.
Anyone had any experience pulling this off?
Thanks!