FAQ

FAQ -- Answers to most Frequently Asked Questions

Описание

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

HTML_QuickForm_Renderer_Tableless FAQ

1. The div tag in the element template is broken, a closing quote mark is missing! Can you please fix this?
2. Why are the hidden form elements put into a div with style display: none?
3. The layout of the forms is broken in Windows Internet Explorer 7. Is there a solution for this problem?
4. The layout of the forms is broken in Firefox 1.x. Is there a solution for this problem?
5. How can I add explainations next to or after form fields with the renderer?
6. 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?

1. 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.

2. 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.

3. 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.

4. 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.

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

6. 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;
    Поддержать сайт на родительском проекте КГБ