[Solved] Tooltip not show when form error codeigniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Solved] Tooltip not show when form error codeigniter (/showthread.php?tid=67570) |
[Solved] Tooltip not show when form error codeigniter - wolfgang1983 - 03-10-2017 When I submit my form if there is a error on title i am trying to be able to trigger the tooltip. Small part of the view below. PHP Code: <div class="form-group"> How ever does not seem to pick up the if (form_error('title')) {} on the controller. I have autoload the form_helper. I can see the validation messages when I use echo validation_error(); Question how can I make sure when there is a form_error it will run the tooltip. PHP Code: <?php RE: Tooltip not show when form error codeigniter - neuron - 03-10-2017 u can use form_error('title') which shows error message. but first u need to add rule in form_validation->set_rule(..); to be able to see from_error() message. u can also add delimiters $this->form_validation->set_error_delimiters('<div class="input-error">', '</div>'); and then select by $('.input-error') to check if there is error u can use <?php if (from_error('title') != '') {?> RE: Tooltip not show when form error codeigniter - wolfgang1983 - 03-10-2017 (03-10-2017, 08:33 AM)neuron Wrote: u can use form_error('title') which shows error message. but first u need to add rule in form_validation->set_rule(..); to be able to see from_error() message. Did not help what I am wanting to do with tooltip RE: Tooltip not show when form error codeigniter - wolfgang1983 - 03-10-2017 I have now solved it On script I have had to use .tooltip('show') like PHP Code: $(function () { And on controller Change the form error around PHP Code: public function index() { |