CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
Adding Custom fields

 



new_to_perl
New User

Jul 29, 2009, 4:31 AM

Post #1 of 6 (6961 views)
Adding Custom fields Can't Post

Can anyone tell me how to add custom fields like dropdown list, textbox etc... dynamically in a website without using programmer intervention. I mean the end user should be able to add custom fields.I need a database driven solution for this.

(This post was edited by new_to_perl on Jul 29, 2009, 10:50 AM)


FishMonger
Veteran / Moderator

Jul 29, 2009, 5:49 AM

Post #2 of 6 (6959 views)
Re: [new_to_perl] Adding Custom fields [In reply to] Can't Post

How does your question relate to DBI?

You should ask that question on a JavaScript forum.


new_to_perl
New User

Jul 29, 2009, 10:03 AM

Post #3 of 6 (6956 views)
Re: [FishMonger] Adding Custom fields [In reply to] Can't Post

It's because i want a database driven solution for adding custom fields.That's the reason i posted it here.


FishMonger
Veteran / Moderator

Jul 29, 2009, 11:45 AM

Post #4 of 6 (6949 views)
Re: [new_to_perl] Adding Custom fields [In reply to] Can't Post

Giving end users that ability to modify the database schema is very bad idea.

You need to rethink and redesign your database structure.


new_to_perl
New User

Jul 30, 2009, 6:29 AM

Post #5 of 6 (6937 views)
Re: [FishMonger] Adding Custom fields [In reply to] Can't Post

Thanks a lot for your reply. I agree that allowing an end user is not a valid solution but to make my query more precise, let me explain clearly , i have different levels of users with different access levels. If a non admin user wants to add custom fields how can he do it using perl. Let us say for example i expect the user to enter a certain value and i have a conditional check in my program to check the value entered by the user. If the condition is true the custom field should appear from the database for that user level.


FishMonger
Veteran / Moderator

Jul 30, 2009, 7:02 AM

Post #6 of 6 (6935 views)
Re: [new_to_perl] Adding Custom fields [In reply to] Can't Post


Quote
If a non admin user wants to add custom fields how can he do it using perl.


You need to use Perl's DBI module and the proper DBD:: module for your database.

The user account that you use to login to the DB needs to have proper rights to alter the database schema.

You use the SQL alter command to add the fields/columns.


Quote
Let us say for example i expect the user to enter a certain value and i have a conditional check in my program to check the value entered by the user. If the condition is true the custom field should appear from the database for that user level.

You'll probably need to have a table in the DB that maps the users to their custom fields.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives