CodeIgniter Forums

Full Version: Get info from Validation Module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]justmelat[/eluser]
We've inherited a codeigniter app, basically an auto-generating form. We want to try something different with the "required" fields but I need to know which fields has been flagged as required. Because of the validation module that codeigniter uses, the fields don't show in the code which one are required. Is there a way, using the onload event, and referencing the validation code to pull all fields that have been mark as required, in to an array?

So in short:

user creates form, [form design page has checkbox that lets user select which fields are/are not required],
open the new form page,
go to validation module,
generate list/array of fields[id's] that are required.

Can this be done, if so how?