|
530 | 530 |
|
531 | 531 | snippet "[FV]Controller Template" do |s|
|
532 | 532 | s.trigger = 'form_v'
|
533 |
| - s.expansion = ' $this->load->library(\'form_validation\'); |
534 |
| - $this->form_validation->set_rules(\'username\', \'Username\', \'trim|required|min_length[5]|max_length[12]|xss_clean\'); |
535 |
| - $this->form_validation->set_rules(\'password\', \'Password\', \'trim|required|matches[passconf]|md5\'); |
536 |
| - $this->form_validation->set_rules(\'passconf\', \'Password Confirmation\', \'trim|required\'); |
537 |
| - $this->form_validation->set_rules(\'email\', \'Email\', \'trim|required|valid_email\'); |
| 533 | + s.expansion = ' \$this->load->library(\'form_validation\'); |
| 534 | + \$this->form_validation->set_rules(\'username\', \'Username\', \'trim|required|min_length[5]|max_length[12]|xss_clean\'); |
| 535 | + \$this->form_validation->set_rules(\'password\', \'Password\', \'trim|required|matches[passconf]|md5\'); |
| 536 | + \$this->form_validation->set_rules(\'passconf\', \'Password Confirmation\', \'trim|required\'); |
| 537 | + \$this->form_validation->set_rules(\'email\', \'Email\', \'trim|required|valid_email\'); |
538 | 538 | if ($this->form_validation->run() == FALSE)
|
539 | 539 | {
|
540 | 540 | $this->load->view(\'myform\');
|
|
545 | 545 | }'
|
546 | 546 | end
|
547 | 547 |
|
548 |
| - snippet "[FV]View Template" do |s| |
549 |
| - s.trigger = 'form_v' |
550 |
| - s.expansion = ' <?php echo validation_errors(); ?> |
551 |
| -
|
552 |
| - <?php echo form_open(\'form\'); ?> |
553 |
| - |
554 |
| - <h5>Username</h5> |
555 |
| - <input type="text" name="username" value="<?php echo set_value(\'username\'); ?>" size="50" /> |
556 |
| - |
557 |
| - <h5>Password</h5> |
558 |
| - <input type="text" name="password" value="<?php echo set_value(\'password\'); ?>" size="50" /> |
559 |
| - |
560 |
| - <h5>Password Confirm</h5> |
561 |
| - <input type="text" name="passconf" value="<?php echo set_value(\'passconf\'); ?>" size="50" /> |
562 |
| - |
563 |
| - <h5>Email Address</h5> |
564 |
| - <input type="text" name="email" value="<?php echo set_value(\'email\'); ?>" size="50" /> |
565 |
| - |
566 |
| - <div><input type="submit" value="Submit" /></div> |
567 |
| - |
568 |
| - </form>' |
569 |
| - end |
570 |
| - |
571 | 548 | #Url_helper
|
572 | 549 | snippet "$this->load->helper(\'url\')" do |s|
|
573 | 550 | s.trigger = 'url'
|
|
0 commit comments