-
☆ A M B ☆
- 1,231 Posts
I read that you need to hack the snippet to have this validated but it throws up another error? Could someone confirm if you can have the ajax search validate in Strict 1.0?
# Error Line 146, Column 32: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
<label for="ajaxSearch_input">
✉
The mentioned element is not allowed to appear in the context in which you’ve placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you’ve forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
@rossco: You simply have to add a pair of <fieldset> tags to your
templates.inc.php file as shown here (beginning on line 14):
//Form Template
'form' => '
<form [+as.formId+]action="[+as.formAction+]" method="post">
<fieldset>
<label for="ajaxSearch_input">
<input id="ajaxSearch_input" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
</label>
<label for="ajaxSearch_submit">
<input id="ajaxSearch_submit" type="submit" name="sub" value="[+as.submitText+]" />
</label>
</fieldset>
</form>',
Cheers,
Jim
------
Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
-
☆ A M B ☆
- 1,231 Posts
Thanks alot for that! Just what I meant. Cheers
Quote from: smg6511 at Apr 23, 2008, 12:17 AM
@rossco: You simply have to add a pair of <fieldset> tags to your templates.inc.php file as shown here (beginning on line 14):
//Form Template
'form' => '
<form [+as.formId+]action="[+as.formAction+]" method="post">
<fieldset>
<label for="ajaxSearch_input">
<input id="ajaxSearch_input" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
</label>
<label for="ajaxSearch_submit">
<input id="ajaxSearch_submit" type="submit" name="sub" value="[+as.submitText+]" />
</label>
</fieldset>
</form>',
Cheers,
Jim