• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
add/edit validation with an Object

#1
[eluser]ericsodt[/eluser]
I am running into an issue where I am trying to edit a form (thats for both an add and editing). I am running into an issue with passing my data as an object and was hoping someone might be able to help me out. Here's the code
CONTROLLER
Code:
if(is_numeric(intval($this->uri->segment(3)))){
                 $data['eventObj'] = $this->event->getById($this->uri->segment(3));
                 return $this->load->view('addEditEvent_view', $data);

here is what my form looks like:

addEditEvent_view.php
Code:
<table class="enterCriteria" width="30%">
  <tr>
   <td>Display Name:</td><td>&lt;input type="text" id="displayName" name="displayName" size="25" value="&lt;?=$this-&gt;validation->displayName;?&gt;"  maxlength="50"></td><td class="error">&lt;?=$this->validation->displayName_error; ?&gt; </td>  
...
...

As you can see in the form I am using the validation class, but am stumped in how I can pass my event Object into the view and have the view use it...

Could anyone help me resove this?


Messages In This Thread
add/edit validation with an Object - by El Forum - 09-30-2007, 04:37 PM
add/edit validation with an Object - by El Forum - 10-01-2007, 07:59 AM
add/edit validation with an Object - by El Forum - 10-01-2007, 01:38 PM
add/edit validation with an Object - by El Forum - 10-01-2007, 01:45 PM
add/edit validation with an Object - by El Forum - 10-01-2007, 03:11 PM
add/edit validation with an Object - by El Forum - 10-02-2007, 12:32 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.