On Fri, Dec 14, 2012 at 2:17 PM, Eduard Moraru <enygma2002(a)gmail.com> wrote:
Hi Jeremie,
Yes, that's the right way to do it and it's what we have already been doing
ourselves.
I`ve updated the document to:
"Obs: The CSS classes have as parent the .xform class. This is supposed to
be used on the form tag, but if the styling is done inside dynamically
generated structures it can be used on other elements, like divs, as long
as the element remains the parent for the other form components. For
instance, a common use case is when you design a form that is to be used in
inline edit mode, you have to wrap it in a div element and use
class='.xform' on the div instead of the form.
This is needed because in
inline edit mode your form element will not be rendered and, instead, your
page will be wrapped inside the main inline edit form."
I replaced this with:
This is needed because in inline edit mode the entire page content is
put inside a form element to which we don't have access as it is
generated in a velocity template, and generating a form element inside
the page content will produce invalid HTML since nested form elements
are not allowed (the inner form element will probably be removed
either by the rendering engine or by the browser).
to better explain (I hope) why generating the form element in inline
edit mode is not recommended.
Hope this helps,
Marius
Hope it's clearer now.
Thanks,
Eduard
On Fri, Dec 14, 2012 at 11:24 AM, Jeremie BOUSQUET <
jeremie.bousquet(a)gmail.com> wrote:
Hello,
Following Vertical Layout standards [1], I've written the following to
display a form (XE 4.3 standalone):
#set($class = $obj.xWikiClass)
{{html wiki="true"}}
<form action="." class="xform" name="form_server">
#foreach($prop in $class.properties)
<dl>
<dt><label for="MySpave.MyClass_0_$prop.name
">$prop.prettyName</label></dt>
<dd>$doc.display($prop.getName())</dd>
</dl>
#end
</form>
{{/html}}
In view mode, labels are correctly displayed uppercase, but in inline edit
mode, they switch to lowercase bold, which is not very nice.
I investigated, and in inline mode my <form> is removed, and replaced by
the encapsulating "inline" <form>. So to fix that, I decorated my form
with
a div with class "xform". Is it the right way to do that ?
If so, I think the comment from [1] is not complete:
"Obs: The CSS classes have as parent the .xform class. This is supposed to
be used on the form tag, but if the styling is done inside dynamically
generated structures it can be used on other elements, like divs, as long
as the element remains the parent for the other form components."
It would not really be limited to dynamically generated structures, but
also to inline edit mode.
BR,
Jeremie
[1] -
http://platform.xwiki.org/xwiki/bin/view/DevGuide/VerticalForms
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users