Recent Changes - Search:

PITS main list

edit sidebar

Main sidebar

PmWiki

pmwiki.org

00577

Summary: Missing class= Attributes in Search (and other) Forms
Created: 2005-10-29 18:37
Status: Closed - added to 2.1.beta24
Category: CoreCandidate
From: HaganFox
Assigned:
Priority: 555
Version: 2.0.12
OS: All

Description: This PITS entry is pursuant to the "Dropped class= Attribute in Search Form" mailing list thread from two months ago. See http://pmichaud.com/pipermail/pmwiki-users/2005-August/017159.html and http://pmichaud.com/pipermail/pmwiki-users/2005-August/017240.html .

These changes will immensly help with CSS styling of forms.

All forms in the PmWiki core should get class= attributes for each "input box" and "input button". Each box or button gets two classes, one general and one specific to that form, as in

input box: class='inputbox specificbox'
input button: class='inputbutton specificbutton'

So the Search Form would have

input box: class='inputbox searchbox'
input button: class='inputbutton searchbutton'

(The Search Form is the form that needs this the most.)

All input boxes will have an inputbox class and all buttons will have an inputbutton class.

Textareas might also get a "specifictextarea" class, but do not need an inputtextarea class because they can be targeted without that (although maybe the redundancy wouldn't hurt -- Pm's call).

Scripts affected

pmwiki.php
authuser.php
forms.php
transition.php
upload.php
refcount.php

Other Input Types

A Question:

An "input box" is
type=text, type=password
An "input button" is
type=submit
What about these input types?
type=checkbox, type=reset, type=file

Why not just use the standard css notations for this?

    input[type=text]
    input[type=password]
    input[type=submit]
    ...

?

"It doesn't work in the XYZ browser" is a valid response; but I'd like to know which browsers it doesn't work in...

--Pm

They don't work in IE6. Classes have the advantage that one can use them for other objects as well, like links styled as boxes. - Hans

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:56 AM