Jump to content


Jquery function - form validation

jquery dinamic form validation

  • Please log in to reply
2 replies to this topic

#1 William Schoeffel

William Schoeffel

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 April 2013 - 11:48 PM

hey guys,

 

i'm having a problem in my form validation.

 

i have 3 fields.

 

total cost, number of payments, cost by payment

 

when the user type the total cost and select the number of payments, i want to calcule the cost by payment dinamicly

 

how i do that? where i call the jquery function?

 

i also want put a mask (money) in total cost field and i don't know how to do that either. 

 

sorry from my english, i'm from brazil!

 

awsome work with this CRUD by the way!

 



#2 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 21 April 2013 - 12:25 AM

1. auto calculation of the cost (static inlcude), depending on the theme you use, you go to assets/themes/your_theme/views/add.php or edit.php and you include there your jquery. for dynamic include prepare the jquery code you want to have included and just before loading the view do this,

$output .= $my_jquery; // where $my_jquery is your jquery function

 

2. you can follow the previous technique and include all the appropriate javascript for the masked input (similar to the above 1) and you might want to call the callback_field for further customization


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#3 William Schoeffel

William Schoeffel

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 22 April 2013 - 12:48 PM

thanks man, you save my ass!

 

cheers from brazil!







Also tagged with one or more of these keywords: jquery, dinamic, form, validation

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users