You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Michael Marth (JIRA)" <ji...@apache.org> on 2008/09/15 14:55:44 UTC

[jira] Created: (SLING-656) sling.wizard() fails when form contains fieldset

sling.wizard() fails when form contains fieldset
------------------------------------------------

                 Key: SLING-656
                 URL: https://issues.apache.org/jira/browse/SLING-656
             Project: Sling
          Issue Type: Bug
          Components: Scripting
         Environment: Browser: Firefox 3 on Windows, Sling bundled with CRX Quickstart
            Reporter: Michael Marth


I got a .jst with a form that I want to fill out using Sling.wizard()
This throws a js error when the form contains fieldsets (http://www.w3.org/TR/html401/interact/forms.html#h-17.10)

sample html code:
					<form class="hform" method="POST" action="/content/myblog/posts/*">
	        				<fieldset>
	          				<legend>Post form</legend>
							
								<p><label>Title</label>
								<input name="title" type="text" size="80"></p>
								
								<p><label>Body</label>
								<textarea name="posttext" cols="40" rows="5"></textarea></p>
								
								<input type="hidden" name="created"/> 
								<input name=":redirect" type="hidden" value="/content/myblog/posts.admin.html"/> 
								
	        				</fieldset>
                                               <input type="submit" value="Post" class="button">
					</form>
					<script>Sling.wizard();</script>


Error in Firebug:

a is undefined

in:

 while (elems.length > i) {
306 var elem=elems[i];
307 var a=elem.name;
--> 308 if (a.indexOf("./")==0) {
309 formfieldprefix="./";
310 break;
311 }
312 i++;
313 }

same form works without fieldsets

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.