Welcome Guest, Not a member yet? Register   Sign In
Contact form question help.
#1

[eluser]razerone[/eluser]
Hi I have a small issue that I am stuck on. And can't seem to find out what or how to fix it.

Say for example I am typing a message in my contact form and click send but miss something and my validation comes up.

But for some reason the text that I have put in that is correct it goes away. And I have to retype it all in.

How do I make it so that the if the input areas are correct the text stays in there. until message sent successfully?

I have tried size="50" in all inputs but nothing. That is only thing I am stuck on. Then I will be finished my contact form.

Code:
<form acti echo base_url('contactus/confirmation');?>" accept-charset="utf-8" method="post" id="contactus-form" role="form">

<div class="form-group">
<label for="name">Full Name</label>
&lt;input class="form-control" type="text" name="name" id="email"&gt;
</div>

<div class="form-group">
<label for="email">Email Address</label>
&lt;input class="form-control" type="text" name="email" id="email" /&gt;
</div>

<div class="form-group">
<label for="website">Website Address</label>
&lt;input class="form-control" type="text" name="website" id="website" /&gt;
</div>

<div class="form-group">
<label for="message">Your Message</label>
&lt;textarea class="form-control" type="text" rows="13" name="message" id="message"&gt;&lt;/textarea>
</div>

&lt;/form&gt;
#2

[eluser]razerone[/eluser]
I have fixed form now got it all worked

Code:
&lt;form acti echo base_url('contactus/confirmation');?&gt;" accept-charset="utf-8" method="post" id="contactus-form" role="form"&gt;

<div class="form-group">
<label for="name">Full Name</label>
&lt;input class="form-control" type="text" name="name" id="email" value="&lt;?php echo set_value('name');?&gt;" size="50"&gt;
</div>

&lt;?php echo form_error('name', '<div class="alert alert-warning">', '</div>'); ?&gt;

<div class="form-group">
<label for="email">Email Address</label>
&lt;input class="form-control" type="text" name="email" id="email" value="&lt;?php echo set_value('email');?&gt;" size="50" /&gt;
</div>

&lt;?php echo form_error('email', '<div class="alert alert-warning">', '</div>'); ?&gt;

<div class="form-group">
<label for="website">Website Address</label>
&lt;input class="form-control" type="text" name="website" id="website" value="&lt;?php echo set_value('website');?&gt;" size="50"/&gt;
</div>

&lt;?php echo form_error('website', '<div class="alert alert-warning">', '</div>'); ?&gt;

<div class="form-group">
<label for="subject">Pick Your Subject</label>
<select class="form-control" name="subject" id="subject" value="&lt;?php echo set_value('subject');?&gt;">
  <option>1</option>
  <option>2</option>
  <option>3</option>
  <option>4</option>
  <option>5</option>
</select>
</div>

&lt;?php echo form_error('subject', '<div class="alert alert-warning">', '</div>'); ?&gt;

<div class="form-group">
<label for="message">Your Message</label>
&lt;textarea class="form-control" type="text" rows="13" name="message" id="message" value="&lt;?php echo set_value('message');?&gt;" size="50"&gt;&lt;/textarea>
</div>

&lt;?php echo form_error('message', '<div class="alert alert-warning">', '</div>'); ?&gt;

<div class="form-group pull-left">
<button type="submit" id="submit" name="submit" class="btn btn-default">Send Message</button>
</div>

<div class="form-group pull-right">
<button type="reset" id="reset" name="reset" class="btn btn-default">Clear Message</button>
</div>

&lt;/form&gt;




Theme © iAndrew 2016 - Forum software by © MyBB