FAQ

FAQ – Answers to most Frequently Asked Questions

Description

This document is based on questions asked on PEAR general mailing list and other mailing lists and forums.

HTML_QuickForm_Renderer_Tableless FAQ

The div tag in the element template is broken, a closing quote mark is missing! Can you please fix this?

No, it is not missing and there is no need to fix the element template.

HTML_QuickForm_Renderer_Tableless requires that HTML_QuickForm >= 3.2.6 is installed. Previous versions don't work correctly for element templates that have two error blocks.

Please use the PEAR installer to avoid such problems in the future. The installer takes care of the dependencies between packages.

Why are the hidden form elements put into a div with style display: none?

This might sound funny because a hidden element is obviously already hidden, but the simple reason for this is the XHTML validity.

XHTML allows input elements only within block elements. And as form is not a block element, but div is a block element, this trick is used to make the output XHTML valid.

The layout of the forms is broken in Windows Internet Explorer 7. Is there a solution for this problem?

Release 0.4.3 contains a fix for this problem. The solution is to remove the "height: 1px;" style from "form fieldset li" block in the stylesheet.

Warning: This breaks layout compatibility with Firefox 1.x browsers (Firefox 2.0 still works as expected). The next question contains a solution for Firefox 1.x compatibility.

The layout of the forms is broken in Firefox 1.x. Is there a solution for this problem?

You need to add a "float: left;" style to the "form fieldset li" block in the stylesheet. In addition, you need to add the following two blocks to your stylesheet:

* html form fieldset li {
    float: none;
}
*+html form fieldset li {
    float: none;
}

If you don't need compatibility with Windows Internet Explorer 7, you don't need the mentioned CSS hacks, but can just (re-)add the "height: 1px;" style to the "form fieldset li" block in the stylesheet.

How can I add explainations next to or after form fields with the renderer?

This is explained here: Howto: Adding explainations next to form fields with Tableless QuickForm renderer.

I'm having problems with the layout, the form and/or the other contents of my page are misplaced. How can I fix these problems?

Such problems are most likely caused by the style of the fieldsets. You can try two possible solutions.

At first, you can try to add

overflow: hidden;

to the "form fieldset" block.

If this does not solve the problems, then try to remove the following two styles from the "form fieldset" block.

clear: both;
float: left;
When I use the tableless renderer together with HTML_QuickForm_Controller, I still see tables. What am I doing wrong?

You have to tell HTML_QuickForm_Controller about the usage of another renderer. A short tutorial is available: Using the tableless renderer together with HTML_QuickForm_Controller