• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set Message With strtolower('{field}') not working

#1
I am trying to make the {field} display in lower case in set message but has first letter upper case.


PHP Code:
$this->form_validation->set_message('is_unique''This ' strtolower('{field}') . ' all ready exists please choose another!'); 
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply

#2
This is because the php strtolower is being applied to 'field' before the field is then replaced with the provided field name.

Is it not possible to just lowercase your filed name in the set rules. Alternatively just remove 'This ' from the message and it will still read well.

Instead of: This Section already exists, please choose another.
Use: Section already exists. Please choose another.

Hope that helps,

Paul.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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