Page 1 of 1

client side event "visibility:hidden"

Posted: Thu Sep 22, 2022 8:17 pm
by eftalboza

The field is hidden when the page is opened; I want to show the field with a client side event. I gave the default fieldC value "0" on the add page. When the add page opens, I want fieldC to be hidden. Help?

note:the code is working. fieldC does not sound hidden. It is controlled by keyup. "?????? " what will i write

{ // keys = event types, values = handler functions
    "?????": function(e) {
        if (this.value == "1") {
          
            $(this).fields("fieldC").visible(true); // true to show, false to hide
           
        } else {
            $(this).fields("fielfC").visible(false); // Set value to FieldB
        }
    }
}

Re: client side event "visibility:hidden"

Posted: Fri Sep 23, 2022 8:42 am
by MichaelG

When the add page opens, I want fieldC to be hidden

You should use the Page's Startup Script:
https://aspnetmaker.dev/docs/#/customsc ... -scripts-1