473,383 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How to make a form generator script? Or dynamic generation script?

Samishii23
246 100+
By generator I mean, like MakeForm('Form1'); pushes out a user password form. Then MakeForm('Form2'); make form that adds Car data information into a DB?
That kind of thing.

I was originally thinking about a "String" parser like this: "fName=Name|fType=Text|fSize=13|fMaxLen=25|". Would print out a <input> tag with the above listed parameters.

Anyone have a thought on this?

Cause my project is gonna have atleast 20 forms or more. And i'd rather have a dynamic maker / parser / etc, then 20+ individual form functions or w/e. It feels sloppy and not well made.
Dec 10 '10 #1
4 3095
JKing
1,206 Expert 1GB
I don't really see the value in this. It seems like a lot of effort for very little gain.

Why would you have 20+ individual form functions?
Dec 13 '10 #2
Samishii23
246 100+
Well. When I developed my mock-up for a project of mine, I made a 1 function for everything just to get the idea or how everything will work, and display properly and all that. Plus it was to show the customer.

But what I see in this, value wise, is that instead of having an individual form for each feature / function of the project, have something that generates the form on demand.

You being way more experienced then myself. If you had a project that had many forms in it, how would you go about it?
Dec 13 '10 #3
JKing
1,206 Expert 1GB
Would your function be purely for outputting the HTML required for the forms? Also if you are taking in all the parameters for each element on the form you are essentially typing the entire form element out except the input tag itself and some quotes?

Without knowing more about your requirements it is hard to say but in general I would have a page with my form and a separate page that processes that form.
Dec 13 '10 #4
Samishii23
246 100+
Yes it would be purely HTML.
Sorry for the late reply. I was putting together my forms ( it took this long because I procrastinate a lot.

I'm missing two forms right now. One of them will be the more complicated of them all, and I'm debating how to do it still.

Tell me JKing. Does this "Style" work for you? Or would you do this differently? This is the most "Compact" I can make it right now with out having a form generator. Even still it would be 'fun'... lol

Though I was debating on one way to make the forms was to basicly scan the db tables for type / len to do some processing based on that. Still mulling over the possibilities.
Attached Files
File Type: txt inc-form.php.txt (10.1 KB, 382 views)
Dec 17 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: fowlertrainer | last post by:
Hi ! Is anyone know about a DB form generator unit under wxPython ? What that's means ? I add information about a Query, or a ListOfDict, I set some other infos (Lookups, others), and it is...
4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
3
by: Peter.Smith1981 | last post by:
Dear All, I've a problem , that was when I creat web page,many script cannot load on same layer.One script onload, last line the </body>. So that I've find any way , but... So you point out...
6
by: Cc | last post by:
hi, how do I make form background colour transparent when I set border style to none?
2
by: ed kool | last post by:
Question how to code "multipart/form-data” in a PHP script ? We are trying to make our program trchat.exe work via the following PHP script: <?php $lang = " English to Dutch"; ...
3
by: Radenko Zec | last post by:
How to programatically add C# form to existed solution? I want to make program(C# form generator),to create solution,add project to new solution,and add several forms later without even opening...
0
by: oakwoodman | last post by:
I have a UNIX script that invokes a DB2 UDB .sql script. I need to pass parameters to the .sql script from the .sh. How does one reference the parameters in the .sql script? The .sql script is not...
0
by: rohitkec | last post by:
I have to run a shell script by perl script & intert some echo statements in the function calls of the shell script.I am new to both perl 7shell script ,please help........
1
by: karthiknd | last post by:
hi everyone , i need a DOS script or WS script which copy folder from one system and has to be replaced in server folder which is in another system. This DOS script or WS script has to be called...
0
by: J. Cliff Dyer | last post by:
On Thu, 2008-05-08 at 10:33 -0500, Victor Subervi wrote: Why are you dynamically creating getpic20.py? Obviously, in the real script, you probably have several of them: getpic1.py, getpic2.py,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.