Home > Community > Forums > Custom IC SKILL > Toggling form fields "editable" from cyclic list and radio button

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Toggling form fields "editable" from cyclic list and radio button 

Last post Tue, Sep 5 2006 2:25 AM by archive. 2 replies.
Started by archive 05 Sep 2006 02:25 AM. Topic has 2 replies and 1464 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, Sep 5 2006 2:25 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    Toggling form fields "editable" from cyclic list and radio button Reply

    I have created a form that has a cyclic list a radio button (or boolean, it doesn't matter) and several float fields. For instance I have var1 float_field11 float field12 var2 float_field21 float field22 ... I would like to 1) change the editable property of each float_fieldx1 depending on the value of the cyclic list 2) change the editable property of each float_fieldx2 depending on the value of the corresponding float_fieldx1 and the value of the radio button (all disable if radio os on "Off" position. I managed to implement 1) but I'm having trouble in getting 2) to work. As of now I'm using two different callbacks for the cyclic fields and the radio button. It lookd like my code works fine when the cyclic list has few elements, however, when the list grows up it doesn't refresh the fields anymore. Any help is very appreciated. Michele


    Originally posted in cdnusers.org by micheleq
    • Post Points: 0
  • Tue, Sep 5 2006 5:49 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    RE: Toggling form fields "editable" from cyclic list and radio button Reply

    The code appeared to have a couple of (what I assume were) mistakes. In the function exUpdateFloatFields it seemed to be leaving the cyc11stFloatField enabled when cyc3 and cyc4 were chosen - which I assume was not what you wanted. I've modifed that and uploaded - but I'm not sure if that was what you were complaining about?

    You could almost certainly write the code to figure out the field names to enable/disable from the cyclic value, which would avoid the big case statement, but I don't think that's what you were asking - I'm assuming you're expecting just one of the four sets of float fields to be enabled at once - if so, that was the coding error which I corrected in the attachment.

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Post Points: 0
  • Tue, Sep 5 2006 6:00 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,950
    RE: Toggling form fields "editable" from cyclic list and radio button Reply

    Hi Andrew, thanks for your reply. However, I put multiple activation at once on purpose. I now solved the issue by using hiUpdateFormBlock(form) inside the exUpdateFormFields. I found that in the regular documentation. Thanks, Michele


    Originally posted in cdnusers.org by micheleq
    • Post Points: 0
Page 1 of 1 (3 items)
Sort Posts:
Started by archive at 05 Sep 2006 02:25 AM. Topic has 2 replies.