Coding Critique is the place to post source code for peer review by other members of DevNetwork. Any kind of code can be posted. Code posted does not have to be limited to PHP. All members are invited to contribute constructive criticism with the goal of improving the code. Posted code should include some background information about it and what areas you specifically would like help with.
Popular code excerpts may be moved to "Code Snippets" by the moderators.
Can anything think of anything else that I could possibly define? Are any of the names unclear? I'm doing it like this so later on another user can come in and change any part of the form rather easily. Or such is my hope. All input appreciated.
I never understood how everyone knew about fieldset and not label. Label is like, the first thing you're supposed to learn when studying into accessibility.
I actually prefer <button> to <input type="submit"> et al. You can style it separately more easily and put markup in it. If you are using accesskeys you can markup a button like this:
although apparently access-keys are a bad idea now, for some reason.
I see no reason for the <span class="form_intput"> tags and I would also use camelCase for my class names. The span in legend is a good idea for rendering purposes but the class is redundant. You do generally seem to be using a lot of classes, I try to minimise the class vocabulary and reuse the names, you can often ascertain mean through context; learn your CSS selectors. For instance, this is very useful:
The span in legend is needed if you try to style it some weird bugs pop up between i.e. and firefox that span is supposed to solve those issues. I haven't tested it to see if that was true but a guy on sitepoint referred me to an article describing it.