Actually I want to pass data-parsley-validate
as a parameter to form_open() function.
Like <form action="http://recruit.com/controller/add_jobs" accept-charset="utf-8" data-parsley-validate>
Actually, you can init parsleyJS with jQuery:
<form id="form"></form> <script> $('#form').parsley(); </script>
So, you dont need to do <form data-parsley-validate></form>
At first load parsley.js in the head of html. then apply parsley.js in the CI like this:
<form role="form" method="post" id="parsleyForm" data-parsley-validate
action="<?php echo site_url('.........') ?>">
go to this link for details of parsley.js
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.