Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2013
    Location
    Australia
    Posts
    120
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Smile PHP Email Question

    Hi.

    I use Codeigniter PHP Email framework.

    I have a small issue. When I type something in to my contact page and miss something the validation comes up which is ok. But then have to re type in the input fields that are correct. How to I make it so if validation errors display that it will not remove any of correct input text. So do not have to re type?

    Thank You.

  • #2
    New Coder
    Join Date
    May 2005
    Location
    New Zealand
    Posts
    76
    Thanks
    0
    Thanked 6 Times in 6 Posts
    The Form validation class documentation on the Codeigniter site says how to do this using the set_value() function. Refer to http://ellislab.com/codeigniter/user...populatingform

    Basically in the view that outputs the html for the contact form you do the following for the fields...

    PHP Code:
    <input type="text" name="first_name" value="<?php echo set_value('first_name'); ?>" size="50" />


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •