Welcome Guest, Not a member yet? Register   Sign In
dynamic form validation
#4

(This post was last modified: 10-17-2015, 02:00 AM by ignitedcms.)

Thanks for the tips mwhitney.

I've opted for saving each field in the database with a field type for example, plain text, rich text, number etc and save the form validation in a column in the database.

For example, plain text => alpha|max_length[10]

Then I loop through the database and dynamically build the form validation using a validation array.

The only specific cases are images or assets, which basically are pulled from another table specific for these,which contains the information such as asset type, image height/width and url.

For dropdown boxes and checkboxes I am saving the details inside a json array.

{ "opt1":"hello", "opt2":"goodby"}

I'm going to implement the json array and assets tomorrow. Everything is done.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply


Messages In This Thread
dynamic form validation - by ignitedcms - 10-14-2015, 03:12 PM
RE: dynamic form validation - by ignitedcms - 10-15-2015, 11:52 AM
RE: dynamic form validation - by mwhitney - 10-16-2015, 08:26 AM
RE: dynamic form validation - by ignitedcms - 10-17-2015, 01:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB