473,946 Members | 16,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Samishii23
246 New Member
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|fTy pe=Text|fSize=1 3|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 3143
JKing
1,206 Recognized Expert Top Contributor
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 New Member
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 Recognized Expert Top Contributor
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 New Member
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, 391 views)
Dec 17 '10 #5

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

Similar topics

0
1141
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 generate a Form with edit boxes, listboxes, etc. Then I can fill up the form with a record's datas. User can modify them. After I can call Apply method, and every modifications are stored in a
4
2168
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 "TAG#") when more than 1 number (see "VLANS") is inputed into my form. QUESTION: How do I make my dynamic form have a dynamic input box(which is created by checking the checkbox and calling the functionC1) inside it and still be able to pass the...
3
1706
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 to me., How to do that case or that matter?
6
17604
by: Cc | last post by:
hi, how do I make form background colour transparent when I set border style to none?
2
10085
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"; $postdata="select=".$lang."&TEXTAREA1=testtext";
3
5402
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 Visual Studio. I suspect that development such project include use Visual Studio Add-in? Please help me?
0
2107
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 a procedure construct.
0
915
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
3123
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 in asp.net page. Each time when asp.net page refresh the script function is to be called and has to be replaced all files in server folder.
0
897
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, etc., but is there any reason you couldn't just have one getpic.py, and pass the number in as a parameter in your GET request, like this: http://localhost/getpic.py?id=6&x=1&w=20
0
9981
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10688
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8253
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7427
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4943
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.