Hi FooShyn,
From: "Foo Shyn Chung" <[email protected]>
I did tried to set the use-when attribute. When setting it to true, the
whole dropdown field is not visible/shown on the form, which is not what i
intended. I need to be able to show the field, just that it is disabled, as
in how the text field behave.
I notice that in the htmlFormMacroLibrary.ftl , the dropdown render do not
have the disabled attributes while the text render do have. Is it possible
to add it there and update the xsd? i tried update my local xsd for
widget-form.xsd but it's no use because the xml is referring to the one on
the ofbiz website...
It would be interesting to pursuie this way. In the meantime I'd use javascript (which will maybe be necessary after all and used
inside, or rather included in, htmlFormMacroLibrary.ftl)
Actually you will need js in all cases
http://www.w3.org/TR/html4/interact/forms.html#adef-disabled
<<Note. The only way to modify dynamically the value of the disabled attribute is
through a script.>>
Jacques
Either way please create a Jira and if possible add your contribution
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
Thanks
Jacques
Thanx
FooShyn
On Tue, Dec 20, 2011 at 6:50 PM, Jacques Le Roux <
[email protected]> wrote:
Try with use-when field attribute, there are plenty of examples, maybe not
exactly the one you are looking for, but it's doable
Jacques
From: "Foo Shyn Chung" <[email protected]>
Hi all,
I'd been searching through google but not having luck with the issue. The
scenario is that I need to display a drop-down that is disabled by
default,
and then having another drop-down that will enabled it back if a certain
option is being selected.
I'd managed to done the hard part by using the event and action attributes
in the field tag to set the drop-down to disabled or enabled. However, i'm
having problem to set the drop-down to be disabled by default.
Is there any simple attribute in drop-down to set the disabled = true or
false just like the text or hidden field?
Thanx
FooShyn