Hi Jacques, Ya, unfortunately the project is dropped midway, and so I did not pursue the matter. Sorry about that.
Thank you Foo Shyn On Apr 21, 2015 23:30, "Jacques Le Roux" <[email protected]> wrote: > Hi FooShyn, > > I think you did not create a Jira then. Because I will certainly implement > that finally... > > Jacques > > Le 22/12/2011 02:17, Foo Shyn Chung a écrit : > >> Hi Jacques, >> >> It is true and currently i'm able to dynamically alter the dropdown box >> through the use of event and action attributes of the form field. >> >> However, i need to by default set the dropdown box as disabled from the >> start, as in when the form is loaded. >> >> I will raise a jira issue and will try to come out with some contribution, >> but first i need to find out how to test xsd changes locally =) >> >> Thanx >> FooShyn >> >> On Thu, Dec 22, 2011 at 4:45 AM, Jacques Le Roux < >> [email protected]> wrote: >> >> 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< >>> 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< >>>> 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 >>>>>>> >>>>>>> >>>>>>> >>>>>>>
