Welcome Guest, Not a member yet? Register   Sign In
Form
#7

[eluser]davy_yg[/eluser]

I fixed my view/contactus.php to this:

Code:
<div id="title">Your Message: </div><br><br>

&lt;?php echo form_open('ccontactus/contact', array('id'=>'contactform'));

      $dataName = array(
              'name'        => 'name',
              'id'          => 'name',
              'value'       => '',
              'maxlength'   => '50',
              'size'        => '20',
              'style'       => 'width:32%',
     'placeholder' => 'Your name'
            );

   echo form_input($dataName); ?&gt;<br>
&lt;?php  
  
   $dataEmail = array(
              'email'       => 'email',
              'id'          => 'email',
              'value'       => '',
              'maxlength'   => '50',
              'size'        => '20',
              'style'       => 'width:32%',
     'placeholder' => 'Your email'
            );

   echo form_input($dataEmail); ?&gt;<br>
&lt;?php  
  
   $dataSubject = array(
              'subject'       => 'subject',
              'id'          => 'subject',
              'value'       => '',
              'maxlength'   => '50',
              'size'        => '20',
              'placeholder' => 'Your subject'
            );

   echo form_input($dataSubject);
  
?&gt;<br>
&lt;?php  
  
   $dataMessage = array(
              'message'     => 'message',
              'id'          => 'message',
              'value'       => '',
              'cols'     => '40',
              'rows'        => '4',
              'style'       => 'width:37%',
     'placeholder' => 'message'
            );

   echo form_textarea($dataMessage);
  
?&gt;<br>
&lt;?php    
  
      echo form_submit('submit', 'kirim', array('class' => 'button'));

?&gt;<br>

I autoload my form helper:

autoload.php

Code:
$autoload['helper'] = array('url', 'form');

I still have these two errors:



A PHP Error was encountered

Severity: Notice

Message: Undefined index: name

Filename: helpers/form_helper.php

Line Number: 264



A PHP Error was encountered

Severity: Notice

Message: Array to string conversion

Filename: helpers/form_helper.php

Line Number: 450

why is it?


Messages In This Thread
Form - by El Forum - 10-19-2013, 05:10 AM
Form - by El Forum - 10-19-2013, 06:38 AM
Form - by El Forum - 10-19-2013, 07:36 AM
Form - by El Forum - 10-19-2013, 09:56 AM
Form - by El Forum - 10-19-2013, 03:23 PM
Form - by El Forum - 10-19-2013, 05:22 PM
Form - by El Forum - 10-19-2013, 08:45 PM
Form - by El Forum - 10-20-2013, 01:52 AM
Form - by El Forum - 10-20-2013, 08:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB