Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: beautiful form(s) with CGI

by Anonymous Monk
on Jan 13, 2015 at 13:08 UTC ( #1113082=note: print w/replies, xml ) Need Help??

in reply to beautiful form(s) with CGI

Yes it is, although CGI isn't directly involved since it's mostly done on the client side with a combination of CSS and JavaScript.

So for example, a quick look at the source of shows that it primarily uses Bootstrap, see There are nowadays a whole bunch of CSS frameworks available, and several JavaScript libraries, such as jQuery (

There are a couple of Perl web frameworks that are "more modern" than CGI which you might want to look at, see for example Mojolicious or Catalyst. But if you're using CGI, here's an example of how you might tie CSS & JavaScript libraries into your page, assuming you've downloaded and to your local directory:

print start_html -style => { -src => [ 'normalize.css', 'mystyle.css' ] }, -script => [ { -type=>"text/javascript", -src=>"jquery-1.11.2.min.js" }, q{ alert("I'm some embedded JavaScript"); } ];

You'll still need to read the documentation of whatever frameworks you decide to use to see how to access their functions, which is usually not a question of Perl but of CSS, HTML and JavaScript. CGI provides a -style argument for most of its HTML functions that can be used to specify CSS classes and other style elements.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1113082]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2022-05-16 10:07 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (62 votes). Check out past polls.