Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
Not sure if this should have gone into PHP or not its more of a database issue really.
Task: Building forms dynamically based on table structure and fieldnames.
Tables will be created by administrators through an admin area. They create a new table to store content, they will need to provide field names, field length, field type, required yes or no and field descriptions in english, german etc.
Problem 1: Need to store help data for each field in different languages e.g. Password must be 6 to 10 characters
Problem 2: Need to store an array of required fields (field names) for form validating.
I will be building in Php and what I'm trying to do is produce a script using OOP to compile forms on the fly based on the table structure however I've been informed that a meta table would be required for storing the field names, translated field names, field comments and max lengths etc.
ID = 1 (name = my name, surname = my surname, age = 18)
(OR table_meta_en, table_meta_de):
MetaID = 1, ID = 1, table = content_table, language = 'en'
Descriptions = (insert your name, insert your surname, age must be over 12)
Required = (yes,yes,no)
What would be the best way to store or organise such information?
Their are so many ways to join these table either by Table name or Table ID.
Appreciate any ideas on the table designs.