homepage Welcome to WebmasterWorld Guest from 23.20.63.27
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
Meta Database For Forms
Trying to build a form script to build forms based on tables and meta data
lasko




msg:1579058
 8:22 am on Oct 14, 2005 (gmt 0)

Hi,

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.

------------

Example

content_table:

ID = 1 (name = my name, surname = my surname, age = 18)

table_meta
(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.

 

bsterz




msg:1579059
 2:25 am on Oct 16, 2005 (gmt 0)

I've actually done this - sticky me and I'll send you the code :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved