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

#6
[eluser]CroNiX[/eluser]
Code:
<form action="/some_controller/some_method">
  <input type="text" name="email" value="" />
  <input type="submit" name="submit" value="submit" />
</form>
Code:
class Some_controller extends CI_Controller {

  public function some_method()
  {
    //grab "email" from first form and send it to the second form
    $data['email'] = $this->input->post('email');

    $this->load->view('some_view', $data);
  }
}
some_view.php
Code:
//grab the $email and display it in the new form
<form action="/some_function/some_other_method" ...blah..your other form>
  <input type="text" name="email" value="<?php echo $email; ?>" />
  <input type="submit" name="submit" value="submit" />
</form>


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.