/    Sign up×
Community /Pin to ProfileBookmark

Simplifying Forms

Forms are something I use, but never read the book so don’t really understand.
I have this web site that uses them extensively. In fact, much of the size of the web site is attributed to the forms. But most of the forms are actually just the same repeated many many times over. Is there any way to extract and replace common information with something equivalent to a macro?

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@CharlesAug 21.2004 — It's supported by Microsoft, but not Mozila or Opera. In XHTML™ you should be able to declare entities, be they local or external. And you would do this by extending the DTD with the DOCTYPE.

[font=monospace]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [

<!ENTITY % Events SYSTEM "events.ent">

%Events;

]>[/font]

But to get it to work in Microsoft you have to use an ".xml" file name extension and you'll need to use XSL to transform the document into HTML. Microsoft doesn't do any formatting if you use the ".xml" extension.
Copy linkTweet thisAlerts:
@ray326Aug 23.2004 — Form elements have names, as should the forms. If the corresponding elements on all the repeated forms are the same then look at their actions. If all the forms have the same action then there is a good chance you could devise a way to reuse a single "template" form for all those inputs, possibly modifying some page aspects with server side includes or other server side techniques.
×

Success!

Help @SuzanneB spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...