Welcome Guest, Not a member yet? Register   Sign In
Model problems
#11

[eluser]stuffradio[/eluser]
I got it to update again!

Now I just need to figure out this checkbox, and radiobutton thing. I can't get them to update properly.

Edit: I can get it to post the correct values for the radio button. It just won't have the correct thing checked if I refresh the page.

Code:
<td>Gender</td> <td>&lt;?php
if ($account->gender == "Male")
{
echo form_radio('gender', 'Male', True);
} else {
echo form_radio('gender', 'Male');
}
   ?&gt;
  Male
  &lt;?php
if ($account->gender == "Female")
{
echo form_radio('gender', 'Female', True);
} else {
echo form_radio('gender', 'Female');
} ?&gt;Female</td>
</tr>

Any suggestions?
#12

[eluser]treehousetim[/eluser]
one suggestion just for code simplicity is to do this:

Code:
echo form_radio('gender', 'Male', $account->gender == "Male" );
echo form_radio('gender', 'Female', $account->gender == "Female" );

To get this to work you must provide $account to your view, and make sure it's populated with the correct data.
#13

[eluser]stuffradio[/eluser]
Thanks Tim!

I didn't even think you could do something like that lol. *rolls eyes*




Theme © iAndrew 2016 - Forum software by © MyBB