• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto fill a field from input box

#1
[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">&lt;input type="text" name="email" class="sendbox" value="Enquire..."/&gt;&lt;/div>
     <div id="send_btn_div"><div id="topnav" class="topnav"><a href="contact" class="signin"><span>&lt;input name="submit" type="submit" class="send" value="" /&gt;&lt;/span></div></div>
     &lt;/form&gt;

I want it get the value and then post it to this full form:
Code:
?php echo form_open('contact/send'); ?&gt;
       &lt;?php if (validation_errors()) { ?&gt;
        <div class="error">&lt;?php echo validation_errors(); ?&gt;</div>
       &lt;?php }?&gt;
      &lt;?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>";
      ?&gt;
    
      &lt;input type="submit" name="submit" class="submit" value="Send" /&gt;
      &lt;?php
      echo form_close();
      ?&gt;

Thanks for reading, and any help appreciated.


Messages In This Thread
auto fill a field from input box - by El Forum - 02-20-2012, 01:24 PM
auto fill a field from input box - by El Forum - 02-20-2012, 01:55 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:00 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:10 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:21 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:27 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:30 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:48 PM
auto fill a field from input box - by El Forum - 02-20-2012, 02:50 PM
auto fill a field from input box - by El Forum - 02-20-2012, 03:03 PM
auto fill a field from input box - by El Forum - 02-20-2012, 03:18 PM
auto fill a field from input box - by El Forum - 02-21-2012, 03:17 AM
auto fill a field from input box - by El Forum - 02-21-2012, 11:46 AM
auto fill a field from input box - by El Forum - 02-21-2012, 12:27 PM
auto fill a field from input box - by El Forum - 02-21-2012, 12:58 PM
auto fill a field from input box - by El Forum - 02-21-2012, 01:02 PM
auto fill a field from input box - by El Forum - 02-21-2012, 01:20 PM
auto fill a field from input box - by El Forum - 02-21-2012, 01:35 PM
auto fill a field from input box - by El Forum - 02-21-2012, 01:46 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.