[eluser]the_unforgiven[/eluser]
Hi Guys,
I have a input field that when you press submit it opens a form and I want to get the email the customer first enters in the input
Code:
So this is the input I'm talking about so whatever anyone enters in here:
<div id="enq_div"><input type="text" name="email" class="sendbox" value="Enquire..."/></div>
<div id="send_btn_div"><div id="topnav" class="topnav"><a href="contact" class="signin"><span><input name="submit" type="submit" class="send" value="" /></span></div></div>
</form>
I want it get the value and then post it to this full form:
Code:
?php echo form_open('contact/send'); ?>
<?php if (validation_errors()) { ?>
<div class="error"><?php echo validation_errors(); ?></div>
<?php }?>
<?php
echo "<p><label for='name'>Name</label><br/>";
$data = array('name'=>'name','id'=>'name','size'=>25);
echo form_input($data) ."</p>";
echo "<p><label for='phone'>Phone</label><br/>";
$phone = array('name'=>'phone','id'=>'phone','size'=>25);
echo form_input($phone) ."</p>";
echo "<p><label for='email'>Email:</label><br/>";
$email = array('name'=>'email','id'=>'email','size'=>25, 'value' => ''); // So in this value would be what the typed in the fist code above, how does one do this??
echo form_input($email) ."</p>";
echo "<p><label for='message'>Requirements/Message:</label><br/>";
$message = array('name'=>'message','id'=>'message','size'=>25);
echo form_textarea($message) ."</p>";
?>
<input type="submit" name="submit" class="submit" value="Send" />
<?php
echo form_close();
?>
Thanks for reading, and any help appreciated.