• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pre-populated inputs and validation

[quote author="Chop" date="1187382560"]
First off - it would be really nice if CI had two extra bits of functionality with the validation class. They have $rules and $fields definitions - now lets us define $values. These would be seed values that would be default values of $this->validation->{field_name} when no submit has taken place.

Agreed. I just fake it with jQuery for now.

Quote:Next up, it'd be offly nice if there was a BOOL that we could access to see if the POST operation had happened. I know that you can fudge it with hidden values and chacking the post data, but it would still be nice to have a $validation_processed variable that we could hit.

If I understand what you're asking, couldn't you just test against the existence of the 'submit' datum in the $_POST array? I usually use a hidden field in this case, but have checked against the presence/absence of 'submit' in the past without any problems.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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