Can anyone help me in trapping the user input,
for example, in my database i have a specific row in my table and its datatype is INT and the GC provided error trapping that upon typing in the textfield, it will only accept numbers. but I've discovered, that it accept also (these specific characters #$%). Can you help me find or locate on the source code on how can i customize it? that it will only accept numbers.
I really appreciate GroceryCrud and it was a big help on our project.
How to customize the validation?
- Single Page
Posted 02 January 2015 - 13:39 PM
Posted 11 January 2015 - 19:34 PM
Help me in these problem please.
Posted 11 January 2015 - 20:26 PM
we i will recommend that you can do the same by setting the HTML 5 form field validations post the page is generated. This can be done by directly altering the properties of the fild you wish to control using javascript.
If you want to make sure that the user enters only numbers - u can use jquery masking for the same.!!!
Hope you get the solution for the same.
Happy GCing :)
Posted 15 January 2015 - 14:30 PM
Or you add the CI validation.
$crud->set_rules(fieldname, prettyfieldname, 'integer');