Page 1 of 1

hide or disable a column field in subrow conditionally..

Posted: Fri Oct 27, 2023 6:12 pm
by andrea763
Hello guys. I've a form (office) with a subform (devices).
The subform open another form for editing detail of the devices (virtual machine).
I'd like to hide or disable the button vm if the first field "tipo di apparato" is not esx.
At the moment i used a javascript for not opening the form detail for the vm in that condition, but it's not clean..
any advice for disable (grey), hide the button vm?

Re: hide or disable a column field in subrow conditionally..

Posted: Fri Oct 27, 2023 6:14 pm
by andrea763
to be...

Re: hide or disable a column field in subrow conditionally..

Posted: Sat Oct 28, 2023 8:32 am
by kev1n
Hi,

Add an onchange event for "tip di apparato"

Code: Select all

nuSubformRowObject(this.id, 'VM').nuEnable(this.value == 'ESX');
Replace VM with the actual object id.


(Untested)

Re: hide or disable a column field in subrow conditionally..

Posted: Sat Oct 28, 2023 11:25 am
by andrea763
Amazing! Thanks to your help, i managed to do it when i change on the dropdown.
But how have this alredy done when you load the subform?

Re: hide or disable a column field in subrow conditionally..

Posted: Sun Oct 29, 2023 5:41 pm
by andrea763
i managed to partially solve this using nupad3 iterating in rows.
but as i can hide other field in the same row, i cannot hide the vm one, on wich there's a onclick funcion to open another subform...
seems a nubuilder bug or problem...
if i change the input type from button to text it works as expected...

Re: hide or disable a column field in subrow conditionally..

Posted: Sun Oct 29, 2023 5:50 pm
by andrea763
ok i solved changing olso the object class like this way .attr('class', 'input_text'); and then hiding the object..
Thank's for the support.